From 001757dbe641c691acea373e5579a8f7f2e47fe5 Mon Sep 17 00:00:00 2001 From: Stephen Gran Date: Thu, 26 Apr 2012 09:02:46 +0100 Subject: [PATCH] keep transitioning to roles Signed-off-by: Stephen Gran --- manifests/site.pp | 49 +------------------------------- modules/roles/manifests/init.pp | 50 +++++++++++++++++++++++++++++++++ 2 files changed, 51 insertions(+), 48 deletions(-) create mode 100644 modules/roles/manifests/init.pp diff --git a/manifests/site.pp b/manifests/site.pp index bb8f2c2e3..3aa599098 100644 --- a/manifests/site.pp +++ b/manifests/site.pp @@ -33,6 +33,7 @@ node default { include hardware include nagios::client include resolv + include roles if $::hostname in [pasquini,tristano] { include ganeti2 @@ -62,54 +63,6 @@ node default { include unbound } - if getfromhash($site::nodeinfo, 'puppetmaster') { - include puppetmaster - } - - if getfromhash($site::nodeinfo, 'muninmaster') { - include munin::master - } - - if getfromhash($site::nodeinfo, 'nagiosmaster') { - include nagios::server - } - - if getfromhash($site::nodeinfo, 'buildd') { - include buildd - } - - if $::hostname in [chopin,franck,morricone,bizet] { - include roles::dakmaster - } - - if getfromhash($site::nodeinfo, 'apache2_security_mirror') { - include roles::security_mirror - } - - if getfromhash($site::nodeinfo, 'apache2_www_mirror') { - include roles::www_mirror - } - - if getfromhash($site::nodeinfo, 'apache2_backports_mirror') { - include roles::backports_mirror - } - - if getfromhash($site::nodeinfo, 'ftp.d.o') { - include roles::ftp - } - - if getfromhash($site::nodeinfo, 'ftp.upload.d.o') { - include roles::ftp_upload - } - - if $::hostname in [bizet,morricone] { - include roles::backports_master - } - - if getfromhash($site::nodeinfo, 'apache2_ftp-upcoming_mirror') { - include roles::ftp-upcoming_mirror - } - if $::apache2 { include apache2 } diff --git a/modules/roles/manifests/init.pp b/modules/roles/manifests/init.pp new file mode 100644 index 000000000..137cd75e4 --- /dev/null +++ b/modules/roles/manifests/init.pp @@ -0,0 +1,50 @@ +class roles { + + if getfromhash($site::nodeinfo, 'puppetmaster') { + include puppetmaster + } + + if getfromhash($site::nodeinfo, 'muninmaster') { + include munin::master + } + + if getfromhash($site::nodeinfo, 'nagiosmaster') { + include nagios::server + } + + if getfromhash($site::nodeinfo, 'buildd') { + include buildd + } + + if $::hostname in [chopin,franck,morricone,bizet] { + include roles::dakmaster + } + + if getfromhash($site::nodeinfo, 'apache2_security_mirror') { + include roles::security_mirror + } + + if getfromhash($site::nodeinfo, 'apache2_www_mirror') { + include roles::www_mirror + } + + if getfromhash($site::nodeinfo, 'apache2_backports_mirror') { + include roles::backports_mirror + } + + if getfromhash($site::nodeinfo, 'ftp.d.o') { + include roles::ftp + } + + if getfromhash($site::nodeinfo, 'ftp.upload.d.o') { + include roles::ftp_upload + } + + if $::hostname in [bizet,morricone] { + include roles::backports_master + } + + if getfromhash($site::nodeinfo, 'apache2_ftp-upcoming_mirror') { + include roles::ftp-upcoming_mirror + } +} -- 2.20.1