From 54f69720413b0a12bcb643e770889a6ad1c81685 Mon Sep 17 00:00:00 2001 From: Joey Hess Date: Tue, 21 Apr 2015 22:39:35 -0400 Subject: propellor spin --- src/Propellor/Property/SiteSpecific/IABak.hs | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) (limited to 'src') diff --git a/src/Propellor/Property/SiteSpecific/IABak.hs b/src/Propellor/Property/SiteSpecific/IABak.hs index 2817bf28..cc0a7b0e 100644 --- a/src/Propellor/Property/SiteSpecific/IABak.hs +++ b/src/Propellor/Property/SiteSpecific/IABak.hs @@ -15,11 +15,12 @@ repo = "https://github.com/ArchiveTeam/IA.BAK/" userrepo :: String userrepo = "git@gitlab.com:archiveteam/IA.bak.users.git" -gitServer :: Property HasInfo -gitServer = propertyList "iabak git server" $ props +gitServer :: [Host] -> Property HasInfo +gitServer knownhosts = propertyList "iabak git server" $ props & Git.cloned "root" repo "/usr/local/IA.BAK" (Just "server") & Git.cloned "root" repo "/usr/local/IA.BAK/client" (Just "master") & Ssh.keyImported SshRsa "root" (Context "IA.bak.users.git") + & Ssh.knownHost knownhosts "gitlab.com" "root" & Git.cloned "www-data" userrepo "/usr/local/IA.BAK/pubkeys" (Just "master") & Apt.serviceInstalledRunning "apache2" & cmdProperty "ln" ["-sf", "/usr/local/IA.BAK/pushme.cgi", "/usr/lib/cgi-bin/pushme.cgi"] @@ -29,10 +30,11 @@ gitServer = propertyList "iabak git server" $ props & Cron.niceJob "shardmaint" Cron.Daily "root" "/" "/usr/local/IA.BAK/shardmaint" -registrationServer :: Property HasInfo -registrationServer = propertyList "iabak registration server" $ props +registrationServer :: [Host] -> Property HasInfo +registrationServer knownhosts = propertyList "iabak registration server" $ props & User.accountFor "registrar" & Ssh.keyImported SshRsa "registrar" (Context "IA.bak.users.git") + & Ssh.knownHost knownhosts "gitlab.com" "registrar" & Git.cloned "registrar" repo "/home/registrar/IA.BAK" (Just "server") & Git.cloned "registrar" userrepo "/home/registrar/users" (Just "master") & Apt.serviceInstalledRunning "apache2" -- cgit v1.2.3