diff options
Diffstat (limited to 'puppet/manifests')
-rw-r--r-- | puppet/manifests/setup.pp | 16 | ||||
-rw-r--r-- | puppet/manifests/site.pp | 30 |
2 files changed, 31 insertions, 15 deletions
diff --git a/puppet/manifests/setup.pp b/puppet/manifests/setup.pp new file mode 100644 index 00000000..80e7ffc2 --- /dev/null +++ b/puppet/manifests/setup.pp @@ -0,0 +1,16 @@ +# +# this is applied before each run of site.pp +# +$services = '' + +Exec { path => '/usr/bin:/usr/sbin/:/bin:/sbin:/usr/local/bin:/usr/local/sbin' } + +include site_config::hosts + +include site_apt + +package { 'facter': + ensure => latest, + require => Exec['refresh_apt'] +} + diff --git a/puppet/manifests/site.pp b/puppet/manifests/site.pp index 1ec806d9..08cbbb9e 100644 --- a/puppet/manifests/site.pp +++ b/puppet/manifests/site.pp @@ -1,39 +1,39 @@ # set a default exec path Exec { path => '/usr/bin:/usr/sbin/:/bin:/sbin:/usr/local/bin:/usr/local/sbin' } -stage { 'initial': - before => Stage['main'], -} +# parse services for host +$services=join(hiera_array('services'), ' ') +notice("Services for ${fqdn}: ${services}") + +# make sure apt is updated before any packages are installed +include apt::update +Package { require => Exec['apt_updated'] } + +include stdlib import 'common' include site_config::default include site_config::slow -# parse services for host -$services=hiera_array('services') -notice("Services for ${fqdn}: ${services}") # configure eip -if 'openvpn' in $services { +if $services =~ /\bopenvpn\b/ { include site_openvpn } -if 'couchdb' in $services { +if $services =~ /\bcouchdb\b/ { include site_couchdb } -if 'webapp' in $services { +if $services =~ /\bwebapp\b/ { include site_webapp + include site_nickserver } -if 'ca' in $services { - include site_ca_daemon -} - -if 'monitor' in $services { +if $services =~ /\bmonitor\b/ { include site_nagios } -if 'tor' in $services { +if $services =~ /\btor\b/ { include site_tor } |