summaryrefslogtreecommitdiff
path: root/Propellor/Property/OpenId.hs
blob: 0f207a5375545cbcd3a125181f4fcf7ccf63f961 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
module Propellor.Property.OpenId where

import Propellor
import qualified Propellor.Property.File as File
import qualified Propellor.Property.Apt as Apt

providerFor :: [UserName] -> Property
providerFor users = propertyList ("openid provider") $
	[ serviceRunning "apache2"
		`requires` Apt.installed ["apache2"]
	, Apt.installed ["simpleid"]
		`onChange` serviceRestarted "apache2"
	, serviceRestarted "apache2"
	] ++ map identfile users
  where
	identfile u = File.hasPrivContent $ concat
		[ "/var/lib/simpleid/identities/", u, ".identity" ]