summaryrefslogtreecommitdiff
path: root/Propellor
diff options
context:
space:
mode:
authorJoey Hess2014-04-03 23:32:00 -0400
committerJoey Hess2014-04-03 23:32:00 -0400
commitff49cf562c3761993a22ea6fe6904325a1e53d33 (patch)
tree9c771ff8069479ddc6f813229f09a0cc417411c7 /Propellor
parentb254cbbab194c948b270cc6456fc6020ed0c0f49 (diff)
propellor spin
Diffstat (limited to 'Propellor')
-rw-r--r--Propellor/Property/Hostname.hs3
1 files changed, 3 insertions, 0 deletions
diff --git a/Propellor/Property/Hostname.hs b/Propellor/Property/Hostname.hs
index 25f0e1b2..f5aa5da7 100644
--- a/Propellor/Property/Hostname.hs
+++ b/Propellor/Property/Hostname.hs
@@ -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]