propellor spin

This commit is contained in:
Joey Hess 2014-04-08 17:51:10 -04:00
parent e435d97927
commit a04539a2ee
Failed to extract signature
2 changed files with 6 additions and 5 deletions

View File

@ -6,13 +6,13 @@ import qualified Propellor.Property.Apt as Apt
import Data.List
providerFor :: [UserName] -> HostName -> Property
providerFor users hostname = propertyList ("openid provider") $
providerFor :: [UserName] -> String -> Property
providerFor users baseurl = propertyList ("openid provider") $
[ serviceRunning "apache2"
`requires` Apt.installed ["apache2"]
, Apt.installed ["simpleid"]
`onChange` serviceRestarted "apache2"
, File.fileProperty ("simpleid host " ++ hostname)
, File.fileProperty ("simpleid host " ++ baseurl)
(map setbaseurl) "/etc/simpleid/config.inc"
] ++ map identfile users
where
@ -20,5 +20,5 @@ providerFor users hostname = propertyList ("openid provider") $
[ "/var/lib/simpleid/identities/", u, ".identity" ]
setbaseurl l
| "SIMPLEID_BASE_URL" `isInfixOf` l =
"define('SIMPLEID_BASE_URL', 'http://"++hostname++"/simpleid');"
"define('SIMPLEID_BASE_URL', 'http://"++baseurl++"/simpleid');"
| otherwise = l

View File

@ -81,7 +81,8 @@ container parenthost name
, Docker.inside $ props
& Apt.stdSourcesList Stable
& Apt.unattendedUpgrades
& OpenId.providerFor ["joey", "liw"] parenthost
& OpenId.providerFor ["joey", "liw"]
(parenthost++":8081")
]
-- armel builder has a companion container that run amd64 and