From a04539a2ee46a3c040bf7a44a6954fa51a035315 Mon Sep 17 00:00:00 2001 From: Joey Hess Date: Tue, 8 Apr 2014 17:51:10 -0400 Subject: propellor spin --- Propellor/Property/OpenId.hs | 8 ++++---- config-joey.hs | 3 ++- 2 files changed, 6 insertions(+), 5 deletions(-) diff --git a/Propellor/Property/OpenId.hs b/Propellor/Property/OpenId.hs index f7440370..2a55ff31 100644 --- a/Propellor/Property/OpenId.hs +++ b/Propellor/Property/OpenId.hs @@ -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 diff --git a/config-joey.hs b/config-joey.hs index 8445f7cd..879e8baf 100644 --- a/config-joey.hs +++ b/config-joey.hs @@ -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 -- cgit v1.2.3