summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorJoey Hess2015-10-17 14:06:57 -0400
committerJoey Hess2015-10-17 14:42:16 -0400
commitba71ad4132a19a37b955d5d865253506394581b7 (patch)
treeb7e66599f9e9525eed5da427aecc2367136c896f /src
parent4e038a43cc9978af1015c53ab7cf27355d989069 (diff)
do propigate Controlling info out of containers
If someone wants to make a container be a controller, that should work, and it should then detect loops that loop back to the container's host.
Diffstat (limited to 'src')
-rw-r--r--src/Propellor/Property/Spin.hs6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/Propellor/Property/Spin.hs b/src/Propellor/Property/Spin.hs
index 81ff24f6..ee65b0a9 100644
--- a/src/Propellor/Property/Spin.hs
+++ b/src/Propellor/Property/Spin.hs
@@ -106,7 +106,9 @@ controllerFor h = toSpin h
`requires` Ssh.installed
-- | Uses `Propellor.Property.Ssh.keysImported` to set up the ssh keys
--- for a controller; so the corresponding private keys come from the privdata.
+-- for the root user on a controller.
+--
+-- (The corresponding private keys come from the privdata.)
controllerKeys :: [(SshKeyType, Ssh.PubKeyText)] -> Property HasInfo
controllerKeys ks = Ssh.userKeys (User "root") hostContext ks
`requires` Ssh.installed
@@ -129,7 +131,7 @@ isControlledBy :: Host -> Controlling -> Bool
h `isControlledBy` (Controlled hs) = any (== hostName h) (map hostName hs)
instance IsInfo Controlling where
- propigateInfo _ = False
+ propigateInfo _ = True
mkControllingInfo :: Host -> Info
mkControllingInfo controlled = addInfo mempty (Controlled [controlled])