diff options
author | varac <varacanero@zeromail.org> | 2014-03-25 23:42:19 +0100 |
---|---|---|
committer | varac <varacanero@zeromail.org> | 2014-03-25 23:42:19 +0100 |
commit | 1457c4a85ad3e7f2fbdc6f969b801542b3396581 (patch) | |
tree | 397058a29510fdd3cdf57cf282eefe358ae222d7 /puppet/modules/site_config | |
parent | a8c9d80317240d86cb7de652c23efbd7bc81bde2 (diff) |
Move setup.pp to a subclass (site_config::setup) (Feature #2993)
Diffstat (limited to 'puppet/modules/site_config')
-rw-r--r-- | puppet/modules/site_config/manifests/default.pp | 26 | ||||
-rw-r--r-- | puppet/modules/site_config/manifests/setup.pp | 49 |
2 files changed, 49 insertions, 26 deletions
diff --git a/puppet/modules/site_config/manifests/default.pp b/puppet/modules/site_config/manifests/default.pp index 53cc60f6..7e421a21 100644 --- a/puppet/modules/site_config/manifests/default.pp +++ b/puppet/modules/site_config/manifests/default.pp @@ -8,19 +8,12 @@ class site_config::default { include apt::update Package { require => Exec['apt_updated'] } - include stdlib - include site_config::slow - include concat::setup - # default class, used by all hosts include lsb, git - # configure apt - include site_apt - # configure sysctl parameters include site_config::sysctl @@ -35,21 +28,12 @@ class site_config::default { include site_config::dhclient } - if ( $::site_config::params::environment == 'local' ) { - include site_config::vagrant - } - # configure /etc/resolv.conf include site_config::resolvconf # configure caching, local resolver include site_config::caching_resolver - # configure /etc/hosts - class { 'site_config::hosts': - stage => setup, - } - # install/configure syslog include site_config::syslog @@ -67,16 +51,6 @@ class site_config::default { # set up core leap files and directories include site_config::files - # redundant declarations, remove if - # "Move setup.pp to a subclass (site_config::setup) (Feature #2993)" - # is solved. - - # if squid_deb_proxy_client is set to true, install and configure - # squid_deb_proxy_client for apt caching - if hiera('squid_deb_proxy_client', false) { - include site_squid_deb_proxy::client - } - if $::services !~ /\bmx\b/ { include site_postfix::satellite } diff --git a/puppet/modules/site_config/manifests/setup.pp b/puppet/modules/site_config/manifests/setup.pp new file mode 100644 index 00000000..ffe01f53 --- /dev/null +++ b/puppet/modules/site_config/manifests/setup.pp @@ -0,0 +1,49 @@ +class site_config::setup { + + # + # 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::params + + include concat::setup + include stdlib + + # configure /etc/hosts + class { 'site_config::hosts': + stage => setup, + } + + include site_config::initial_firewall + + include site_apt + + package { 'facter': + ensure => latest, + require => Exec['refresh_apt'] + } + + # if squid_deb_proxy_client is set to true, install and configure + # squid_deb_proxy_client for apt caching + if hiera('squid_deb_proxy_client', false) { + include site_squid_deb_proxy::client + } + + # shorewall is installed/half-configured during setup.pp (Bug #3871) + # we need to include shorewall::interface{eth0} in setup.pp so + # packages can be installed during main puppetrun, even before shorewall + # is configured completly + if ( $::site_config::params::environment == 'local' ) { + include site_config::vagrant + } + + # if class site_custom::setup exists, include it. + # possibility for users to define custom puppet recipes + if defined( '::site_custom::setup') { + include ::site_custom::setup + } + +} |