Merge branch 'joeyconfig'
This commit is contained in:
commit
6d56dbd35a
|
@ -109,6 +109,7 @@ clam = standardSystem "clam.kitenet.net" Unstable "amd64"
|
||||||
& File.notPresent "/var/www/html/index.html"
|
& File.notPresent "/var/www/html/index.html"
|
||||||
& "/var/www/index.html" `File.hasContent` ["hello, world"]
|
& "/var/www/index.html" `File.hasContent` ["hello, world"]
|
||||||
& alias "helloworld.kitenet.net"
|
& alias "helloworld.kitenet.net"
|
||||||
|
& Docker.docked oldusenetShellBox
|
||||||
|
|
||||||
-- ssh on some extra ports to deal with horrible networks
|
-- ssh on some extra ports to deal with horrible networks
|
||||||
-- while travelling
|
-- while travelling
|
||||||
|
@ -216,6 +217,7 @@ kite = standardSystemUnhardened "kite.kitenet.net" Testing "amd64"
|
||||||
|
|
||||||
& Docker.configured
|
& Docker.configured
|
||||||
& Docker.garbageCollected `period` Daily
|
& Docker.garbageCollected `period` Daily
|
||||||
|
& Docker.docked oldusenetShellBox
|
||||||
|
|
||||||
diatom :: Host
|
diatom :: Host
|
||||||
diatom = standardSystem "diatom.kitenet.net" (Stable "wheezy") "amd64"
|
diatom = standardSystem "diatom.kitenet.net" (Stable "wheezy") "amd64"
|
||||||
|
|
|
@ -1,3 +1,10 @@
|
||||||
|
propellor (1.2.2) UNRELEASED; urgency=medium
|
||||||
|
|
||||||
|
* Revert ensureProperty warning message, too many false positives in places
|
||||||
|
where Info is correctly propigated. Better approach needed.
|
||||||
|
|
||||||
|
-- Joey Hess <id@joeyh.name> Sun, 21 Dec 2014 21:11:45 -0400
|
||||||
|
|
||||||
propellor (1.2.1) unstable; urgency=medium
|
propellor (1.2.1) unstable; urgency=medium
|
||||||
|
|
||||||
* Added CryptPassword to PrivDataField, for password hashes as produced
|
* Added CryptPassword to PrivDataField, for password hashes as produced
|
||||||
|
|
|
@ -23,7 +23,6 @@ import System.FilePath
|
||||||
import System.Directory
|
import System.Directory
|
||||||
|
|
||||||
import Propellor.Types
|
import Propellor.Types
|
||||||
import Propellor.Types.Empty
|
|
||||||
import Propellor.Message
|
import Propellor.Message
|
||||||
import Propellor.Exception
|
import Propellor.Exception
|
||||||
import Propellor.Info
|
import Propellor.Info
|
||||||
|
@ -36,7 +35,7 @@ import Utility.Monad
|
||||||
mainProperties :: Host -> IO ()
|
mainProperties :: Host -> IO ()
|
||||||
mainProperties host = do
|
mainProperties host = do
|
||||||
ret <- runPropellor host $
|
ret <- runPropellor host $
|
||||||
ensureProperties [Property "overall" (ensurePropertiesWith ensureProperty' $ hostProperties host) mempty]
|
ensureProperties [Property "overall" (ensureProperties $ hostProperties host) mempty]
|
||||||
h <- mkMessageHandle
|
h <- mkMessageHandle
|
||||||
whenConsole h $
|
whenConsole h $
|
||||||
setTitle "propellor: done"
|
setTitle "propellor: done"
|
||||||
|
@ -63,30 +62,17 @@ runEndAction host res (EndAction desc a) = actionMessageOn (hostName host) desc
|
||||||
|
|
||||||
-- | For when code running in the Propellor monad needs to ensure a
|
-- | For when code running in the Propellor monad needs to ensure a
|
||||||
-- Property.
|
-- Property.
|
||||||
--
|
|
||||||
-- Note that any info of the Property is not propigated out to
|
|
||||||
-- the enclosing Property, and so will not be available for propellor to
|
|
||||||
-- use. A warning message will be printed if this is detected.
|
|
||||||
ensureProperty :: Property -> Propellor Result
|
ensureProperty :: Property -> Propellor Result
|
||||||
ensureProperty p = do
|
ensureProperty = catchPropellor . propertySatisfy
|
||||||
unless (isEmpty (getInfo p)) $
|
|
||||||
warningMessage $ "ensureProperty called on " ++ show p ++ "; will not propigate its info: " ++ show (getInfo p)
|
|
||||||
ensureProperty' p
|
|
||||||
|
|
||||||
ensureProperty' :: Property -> Propellor Result
|
|
||||||
ensureProperty' = catchPropellor . propertySatisfy
|
|
||||||
|
|
||||||
-- | Ensures a list of Properties, with a display of each as it runs.
|
-- | Ensures a list of Properties, with a display of each as it runs.
|
||||||
ensureProperties :: [Property] -> Propellor Result
|
ensureProperties :: [Property] -> Propellor Result
|
||||||
ensureProperties = ensurePropertiesWith ensureProperty
|
ensureProperties ps = ensure ps NoChange
|
||||||
|
|
||||||
ensurePropertiesWith :: (Property -> Propellor Result) -> [Property] -> Propellor Result
|
|
||||||
ensurePropertiesWith a ps = ensure ps NoChange
|
|
||||||
where
|
where
|
||||||
ensure [] rs = return rs
|
ensure [] rs = return rs
|
||||||
ensure (p:ls) rs = do
|
ensure (p:ls) rs = do
|
||||||
hn <- asks hostName
|
hn <- asks hostName
|
||||||
r <- actionMessageOn hn (propertyDesc p) (a p)
|
r <- actionMessageOn hn (propertyDesc p) (ensureProperty p)
|
||||||
ensure ls (r <> rs)
|
ensure ls (r <> rs)
|
||||||
|
|
||||||
-- | Lifts an action into a different host.
|
-- | Lifts an action into a different host.
|
||||||
|
|
|
@ -456,7 +456,8 @@ chain hostlist hn s = case toContainerId s of
|
||||||
go cid h = do
|
go cid h = do
|
||||||
changeWorkingDirectory localdir
|
changeWorkingDirectory localdir
|
||||||
onlyProcess (provisioningLock cid) $ do
|
onlyProcess (provisioningLock cid) $ do
|
||||||
r <- runPropellor h $ ensureProperties $ hostProperties h
|
r <- runPropellor h $ ensureProperties $
|
||||||
|
hostProperties h
|
||||||
putStrLn $ "\n" ++ show r
|
putStrLn $ "\n" ++ show r
|
||||||
|
|
||||||
stopContainer :: ContainerId -> IO Bool
|
stopContainer :: ContainerId -> IO Bool
|
||||||
|
|
Loading…
Reference in New Issue