From 7d9b164ce552c7737a0d85308548c18b3f72bf7d Mon Sep 17 00:00:00 2001 From: Joey Hess Date: Fri, 16 Oct 2015 14:29:32 -0400 Subject: switch config-simple.hs to use a hosts list and toplevel Host definitions This is how I do it in my own config.hs, and it's generally useful to have a hosts list, and toplevel Host definitions to pass to various properties. If you're getting a conflict from this in your own config.hs file, you can just ignore these changes.. --- config-simple.hs | 31 ++++++++++++++++--------------- 1 file changed, 16 insertions(+), 15 deletions(-) (limited to 'config-simple.hs') diff --git a/config-simple.hs b/config-simple.hs index 67c06120..0bc08def 100644 --- a/config-simple.hs +++ b/config-simple.hs @@ -18,24 +18,25 @@ main :: IO () main = defaultMain hosts -- The hosts propellor knows about. --- Edit this to configure propellor! hosts :: [Host] hosts = - [ host "mybox.example.com" - & os (System (Debian Unstable) "amd64") - & Apt.stdSourcesList - & Apt.unattendedUpgrades - & Apt.installed ["etckeeper"] - & Apt.installed ["ssh"] - & User.hasSomePassword (User "root") - & Network.ipv6to4 - & File.dirExists "/var/www" - & Docker.docked webserverContainer - & Docker.garbageCollected `period` Daily - & Cron.runPropellor (Cron.Times "30 * * * *") + [ mybox + ] - -- add more hosts here... - --, host "foo.example.com" = ... +-- An example host. +mybox :: Host +mybox = host "mybox.example.com" + & os (System (Debian Unstable) "amd64") + & Apt.stdSourcesList + & Apt.unattendedUpgrades + & Apt.installed ["etckeeper"] + & Apt.installed ["ssh"] + & User.hasSomePassword (User "root") + & Network.ipv6to4 + & File.dirExists "/var/www" + & Docker.docked webserverContainer + & Docker.garbageCollected `period` Daily + & Cron.runPropellor (Cron.Times "30 * * * *") ] -- A generic webserver in a Docker container. -- cgit v1.2.3