/ config-simple.hs
config-simple.hs
1 -- This is the main configuration file for Propellor, and is used to build 2 -- the propellor program. 3 4 import Propellor 5 import qualified Propellor.Property.Apt as Apt 6 import qualified Propellor.Property.Brew as Brew 7 import qualified Propellor.Property.Cron as Cron 8 import qualified Propellor.Property.File as File 9 import qualified Propellor.Property.User as User 10 import Propellor.Spin (spinUser) 11 12 main :: IO () 13 main = defaultMain hosts 14 15 -- The hosts propellor knows about. 16 hosts :: [Host] 17 hosts = 18 [mybox] 19 20 -- An example host. 21 mybox :: Host 22 mybox = 23 host "mybox.example.com" $ 24 props 25 & osDebian Unstable X86_64 26 & Apt.stdSourcesList 27 & Apt.unattendedUpgrades 28 & Apt.installed ["etckeeper"] 29 & Apt.installed ["ssh"] 30 & User.hasSomePassword (User "root") 31 & File.dirExists "/var/www" 32 & Cron.runPropellor (Cron.Times "30 * * * *") 33 34 -- An example host. 35 mac_mini :: Host 36 mac_mini = 37 host "mac-mini-1.local" $ 38 props 39 & osDarwin ARM64 40 & spinUser (User "arnaudbailly") 41 & Brew.installed "git" 42 & Brew.installed "htop" 43 44 mac_mini_2 :: Host 45 mac_mini_2 = 46 host "mac-mini-2.local" $ 47 props 48 & osDarwin ARM64 49 & spinUser (User "arnaud") 50 & Brew.installed "git" 51 & Brew.installed "sqlite" 52 & Brew.installed "htop"