From ba71ad4132a19a37b955d5d865253506394581b7 Mon Sep 17 00:00:00 2001 From: Joey Hess Date: Sat, 17 Oct 2015 14:06:57 -0400 Subject: 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. --- src/Propellor/Property/Spin.hs | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'src/Propellor/Property/Spin.hs') 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]) -- cgit v1.2.3