Merge branch 'joeyconfig'

This commit is contained in:
Joey Hess 2014-06-05 17:30:39 -04:00
commit dc25de234c
2 changed files with 14 additions and 9 deletions

View File

@ -24,7 +24,8 @@ main = defaultMain hosts
hosts :: [Host] hosts :: [Host]
hosts = hosts =
[ host "mybox.example.com" [ host "mybox.example.com"
& Apt.stdSourcesList Unstable & os (System (Debian Unstable) "amd64")
& Apt.stdSourcesList
& Apt.unattendedUpgrades & Apt.unattendedUpgrades
& Apt.installed ["etckeeper"] & Apt.installed ["etckeeper"]
& Apt.installed ["ssh"] & Apt.installed ["ssh"]
@ -36,7 +37,9 @@ hosts =
& Cron.runPropellor "30 * * * *" & Cron.runPropellor "30 * * * *"
-- A generic webserver in a Docker container. -- A generic webserver in a Docker container.
, Docker.container "webserver" "joeyh/debian-unstable" , Docker.container "webserver" "joeyh/debian-stable"
& os (System (Debian Stable) "amd64")
& Apt.stdSourcesList
& Docker.publish "80:80" & Docker.publish "80:80"
& Docker.volume "/var/www:/var/www" & Docker.volume "/var/www:/var/www"
& Apt.serviceInstalledRunning "apache2" & Apt.serviceInstalledRunning "apache2"

View File

@ -41,22 +41,24 @@ stub to go run itself. No need to ever change this part.
hosts :: [Host] hosts :: [Host]
hosts = hosts =
[ host "mybox.example.com" [ host "mybox.example.com"
& Apt.stdSourcesList Unstable & os (System (Debian Unstable) "amd64")
& Apt.stdSourcesList
, host "server.example.com" , host "server.example.com"
& Apt.stdSourcesList Stable & os (System (Debian Stable) "amd64")
& Apt.stdSourcesList
& Apt.installed ["ssh"] & Apt.installed ["ssh"]
] ]
"""]] """]]
This defines a list of hosts, with two hosts in it. This defines a list of hosts, with two hosts in it.
The configuration for the mybox host tells propellor to configure its The configuration for the mybox host first tells propellor what
`/etc/apt/sources.list` to use Debian `Unstable`. OS it's running. Then the `stdSourcesList` line tells propellor to
Of course you might want to change that to `Stable`. configure its `/etc/apt/sources.list`, using its OS.
(Of course you might want to change that `Unstable` to `Stable`.)
Each property of the host is prefixed with an "&" operator. This just makes Each property of the host is prefixed with an "&" operator. This just makes
a list of properties. Above, the first host has only 1 property, while a list of properties.
the second host has 2 properties.
Some other properties you may find in your config.hs, or want to add: Some other properties you may find in your config.hs, or want to add: