summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJoey Hess2015-10-17 14:06:57 -0400
committerJoey Hess2015-10-17 14:42:16 -0400
commitba71ad4132a19a37b955d5d865253506394581b7 (patch)
treeb7e66599f9e9525eed5da427aecc2367136c896f
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.
-rw-r--r--config-joey.hs1
-rw-r--r--src/Propellor/Property/Spin.hs6
2 files changed, 4 insertions, 3 deletions
diff --git a/config-joey.hs b/config-joey.hs
index f862a2fb..e973d35e 100644
--- a/config-joey.hs
+++ b/config-joey.hs
@@ -190,7 +190,6 @@ honeybee = standardSystem "honeybee.kitenet.net" Testing "armhf"
kite :: Host
kite = standardSystemUnhardened "kite.kitenet.net" Testing "amd64"
[ "Welcome to kite!" ]
- & Spin.controllerFor clam
& ipv4 "66.228.36.95"
& ipv6 "2600:3c03::f03c:91ff:fe73:b0d2"
& alias "kitenet.net"
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])