propellor spin

This commit is contained in:
Joey Hess 2014-04-03 23:32:00 -04:00
parent b254cbbab1
commit ff49cf562c
Failed to extract signature
1 changed files with 3 additions and 0 deletions

View File

@ -3,6 +3,9 @@ module Propellor.Property.Hostname where
import Propellor
import qualified Propellor.Property.File as File
-- | Sets the hostname. Should be provided with a FQDN, and will configure
-- both /etc/hostname (with the base hostname) and /etc/hosts (with the
-- full hostname). Also sets the current hostname.
set :: HostName -> Property
set hostname = "/etc/hostname" `File.hasContent` [hostname]
`onChange` cmdProperty "hostname" [hostname]