diff options
| author | Joey Hess <joeyh@joeyh.name> | 2015-10-16 14:29:32 -0400 |
|---|---|---|
| committer | Joey Hess <joeyh@joeyh.name> | 2015-10-16 14:29:32 -0400 |
| commit | 7d9b164ce552c7737a0d85308548c18b3f72bf7d (patch) | |
| tree | df3c44e42b542467c1bdf4106543f107d6328e8e /config-simple.hs | |
| parent | e66b62f40bcb29ca62c905dabe87cc6e91a6bccd (diff) | |
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..
Diffstat (limited to 'config-simple.hs')
| -rw-r--r-- | config-simple.hs | 31 |
1 files changed, 16 insertions, 15 deletions
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. |
