summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJoey Hess2015-10-16 19:13:35 -0400
committerJoey Hess2015-10-16 19:13:35 -0400
commit87399e777b631e17ca4ba3be470140607184ecf0 (patch)
treed99a00047b30db132877eca943fcaf3003a0ffdc
parent33ab6b76c57f4b2757671bcd07418d8aad25b919 (diff)
propellor spin
-rw-r--r--src/Propellor/Property/Ssh.hs8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/Propellor/Property/Ssh.hs b/src/Propellor/Property/Ssh.hs
index cdfa36b0..55878e0d 100644
--- a/src/Propellor/Property/Ssh.hs
+++ b/src/Propellor/Property/Ssh.hs
@@ -222,7 +222,7 @@ instance Monoid HostKeyInfo where
HostKeyInfo (new `M.union` old)
userPubKeys :: User -> [(SshKeyType, PubKeyText)] -> Property HasInfo
-userPubKeys u@(User n) l = pureInfoProperty ("ssh pubkey known for " ++ n) $
+userPubKeys u@(User n) l = pureInfoProperty ("ssh pubkey for " ++ n) $
UserKeyInfo (M.singleton u (S.fromList l))
getUserPubKeys :: User -> Propellor [(SshKeyType, PubKeyText)]
@@ -246,7 +246,7 @@ instance Monoid UserKeyInfo where
-- The public keys are added to the Info, so other properties like
-- `authorizedKeysFrom` can use them.
userKeys :: IsContext c => User -> c -> [(SshKeyType, PubKeyText)] -> Property HasInfo
-userKeys user@(User name) context ks = propertyList desc $
+userKeys user@(User name) context ks = combineProperties desc $
userPubKeys user ks : map (userKeyAt Nothing user context) ks
where
desc = unwords
@@ -263,7 +263,7 @@ userKeys user@(User name) context ks = propertyList desc $
-- different roles.
userKeyAt :: IsContext c => Maybe FilePath -> User -> c -> (SshKeyType, PubKeyText) -> Property HasInfo
userKeyAt dest user@(User u) context (keytype, pubkeytext) =
- propertyList desc $ props
+ combineProperties desc $ props
& pubkey
& privkey
where
@@ -331,7 +331,7 @@ localuser@(User ln) `authorizedKeysFrom` (remoteuser@(User rn), remotehost) =
go [] = do
warningMessage $ "no configured ssh user keys for " ++ remote
return FailedChange
- go ks = ensureProperty $ propertyList desc $
+ go ks = ensureProperty $ combineProperties desc $
map (authorizedKey localuser . snd) ks
-- | Makes a user have authorized_keys from the PrivData