]> git.donarmstrong.com Git - dsa-puppet.git/commitdiff
keep transitioning to roles
authorStephen Gran <steve@lobefin.net>
Thu, 26 Apr 2012 08:02:46 +0000 (09:02 +0100)
committerStephen Gran <steve@lobefin.net>
Fri, 27 Apr 2012 09:21:14 +0000 (10:21 +0100)
Signed-off-by: Stephen Gran <steve@lobefin.net>
manifests/site.pp
modules/roles/manifests/init.pp [new file with mode: 0644]

index bb8f2c2e3299dcadac3574c6839058fb990bca9c..3aa5990985c37b4d78987b6c29701b2953db822e 100644 (file)
@@ -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 (file)
index 0000000..137cd75
--- /dev/null
@@ -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
+       }
+}