From 4cab90c13713025a66c4aec7074730faa2e2b4ed Mon Sep 17 00:00:00 2001 From: Joey Hess Date: Wed, 12 Aug 2015 17:00:03 -0400 Subject: propellor spin --- src/Propellor/Property/Network.hs | 9 +++++++++ src/Propellor/Property/SiteSpecific/GitAnnexBuilder.hs | 5 ++--- src/Propellor/Property/SiteSpecific/IABak.hs | 1 + 3 files changed, 12 insertions(+), 3 deletions(-) (limited to 'src/Propellor/Property') diff --git a/src/Propellor/Property/Network.hs b/src/Propellor/Property/Network.hs index 4d7ccffb..e01edb62 100644 --- a/src/Propellor/Property/Network.hs +++ b/src/Propellor/Property/Network.hs @@ -27,6 +27,15 @@ cleanInterfacesFile = hasContent interfacesFile ] `describe` ("clean " ++ interfacesFile) +-- | Configures an interface to get its address via dhcp. +dhcp :: Interface -> Property NoInfo +dhcp iface = hasContent (interfaceDFile iface) + [ "auto " ++ iface + , "iface " ++ iface ++ " inet dhcp" + ] + `describe` ("dhcp " ++ iface) + `requires` interfacesDEnabled + -- | Writes a static interface file for the specified interface. -- -- The interface has to be up already. It could have been brought up by diff --git a/src/Propellor/Property/SiteSpecific/GitAnnexBuilder.hs b/src/Propellor/Property/SiteSpecific/GitAnnexBuilder.hs index 5ccd9996..6a6d5bfd 100644 --- a/src/Propellor/Property/SiteSpecific/GitAnnexBuilder.hs +++ b/src/Propellor/Property/SiteSpecific/GitAnnexBuilder.hs @@ -115,8 +115,8 @@ standardAutoBuilder osver@(System _ arch) = & User.accountFor (User builduser) & tree arch -armAutoBuilder :: System -> Times -> TimeOut -> Property HasInfo -armAutoBuilder osver@(System _ arch) crontime timeout = +armAutoBuilder :: System -> Property HasInfo +armAutoBuilder osver = propertyList "arm git-annex autobuilder" $ props & standardAutoBuilder osver & buildDepsNoHaskellLibs @@ -126,7 +126,6 @@ armAutoBuilder osver@(System _ arch) crontime timeout = -- Install patched haskell packages for portability to -- arm NAS's using old kernel versions. & haskellPkgsInstalled "linux" - & autobuilder arch crontime timeout androidAutoBuilderContainer :: Times -> TimeOut -> Systemd.Container androidAutoBuilderContainer crontimes timeout = diff --git a/src/Propellor/Property/SiteSpecific/IABak.hs b/src/Propellor/Property/SiteSpecific/IABak.hs index 7740f820..8c9926bc 100644 --- a/src/Propellor/Property/SiteSpecific/IABak.hs +++ b/src/Propellor/Property/SiteSpecific/IABak.hs @@ -36,6 +36,7 @@ gitServer knownhosts = propertyList "iabak git server" $ props "/usr/local/IA.BAK/shardstats-all" & Cron.niceJob "shardmaint" Cron.Daily (User "root") "/" "/usr/local/IA.BAK/shardmaint-fast; /usr/local/IA.BAK/shardmaint" + & Apt.installed ["git-annex"] registrationServer :: [Host] -> Property HasInfo registrationServer knownhosts = propertyList "iabak registration server" $ props -- cgit v1.2.3