diff options
| author | Joey Hess <joeyh@joeyh.name> | 2015-01-04 17:14:07 -0400 |
|---|---|---|
| committer | Joey Hess <joeyh@joeyh.name> | 2015-01-04 17:14:07 -0400 |
| commit | fd1e01c853d9aff6435b3421f4134a63144fa2b5 (patch) | |
| tree | c35722386330d689d8b6ea86a8147e95d78680d4 | |
| parent | 017e1928d4ec5f7a132ce2ad4c2c97c0b89fbcab (diff) | |
avoid ever removing all host keys
| -rw-r--r-- | src/Propellor/Property/Ssh.hs | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/Propellor/Property/Ssh.hs b/src/Propellor/Property/Ssh.hs index 4f8ee32e..b6ed476e 100644 --- a/src/Propellor/Property/Ssh.hs +++ b/src/Propellor/Property/Ssh.hs @@ -98,8 +98,8 @@ hostKeys ctx l = propertyList desc $ catMaybes $ staletypes = let have = map fst l in filter (`notElem` have) alltypes removestale b = map (File.notPresent . flip keyFile b) staletypes cleanup - | null staletypes = Nothing - | otherwise = Just $ property ("stale host keys removed " ++ typelist staletypes) $ + | null staletypes || null l = Nothing + | otherwise = Just $ property ("any other ssh host keys removed " ++ typelist staletypes) $ ensureProperty $ combineProperties desc (removestale True ++ removestale False) `onChange` restarted |
