X-Git-Url: https://git.adam-barratt.org.uk/?a=blobdiff_plain;f=modules%2Froles%2Fmanifests%2Finit.pp;h=09de1f91e1c79895c47b4d88cc45df90e2ebe425;hb=17942a3ff54d939a9cf1d2f3761fe22bb6251ea1;hp=a4a6cf08b9b5b765d8ebed82d9110ef2d198fbe9;hpb=1af943401cb3dea6a550030e3c6ad3043c463e03;p=mirror%2Fdsa-puppet.git diff --git a/modules/roles/manifests/init.pp b/modules/roles/manifests/init.pp index a4a6cf08b..adc2795ad 100644 --- a/modules/roles/manifests/init.pp +++ b/modules/roles/manifests/init.pp @@ -1,81 +1,56 @@ +# = Class: roles +# +# Lookup role and include relevant classes for roles +# +# == Sample Usage: +# +# include roles +# class roles { - - if getfromhash($site::nodeinfo, 'puppetmaster') { - include puppetmaster - } - - if getfromhash($site::nodeinfo, 'muninmaster') { + if has_role('muninmaster') { include munin::master } - #if getfromhash($site::nodeinfo, 'nagiosmaster') { - # include nagios::server - #} - - if getfromhash($site::nodeinfo, 'buildd') { - include buildd + if has_role('nagiosmaster') { + include nagios::server } - if getfromhash($site::nodeinfo, 'porterbox') { - include porterbox + # archive.debian.org + if has_role('historical_mirror') { + include roles::historical_mirror } - if getfromhash($site::nodeinfo, 'bugs_mirror') { - include roles::bugs_mirror + # debug archive + if has_role('debug_mirror') { + include roles::debug_mirror } - if getfromhash($site::nodeinfo, 'ftp_master') { - include roles::ftp_master - include roles::dakmaster + # ftp.debian.org and its ecosystem + if has_role('debian_mirror') { + include roles::debian_mirror } - if getfromhash($site::nodeinfo, 'apache2_security_mirror') { + if has_role('security_mirror') { include roles::security_mirror } - if getfromhash($site::nodeinfo, 'apache2_www_mirror') { - include roles::www_mirror - } - - if getfromhash($site::nodeinfo, 'ftp.d.o') { - include roles::ftp - } - - if getfromhash($site::nodeinfo, 'ftp.upload.d.o') { - include roles::ftp_upload + if has_role('postgres_backup_server') { + include postgres::backup_server } - if getfromhash($site::nodeinfo, 'security_master') { - include roles::security_master - include roles::dakmaster + if $::hostname in [lw01, lw02, lw03, lw04, lw09, lw10] { + include roles::snapshot } - if getfromhash($site::nodeinfo, 'www_master') { - include roles::www_master + if has_role('bgp') { + include roles::bgp } - if getfromhash($site::nodeinfo, 'keyring') { - include roles::keyring + if has_role('postgresql_server') { + include postgres::backup_source } - if getfromhash($site::nodeinfo, 'apache2_ftp-upcoming_mirror') { - include roles::ftp-upcoming_mirror - } - - if getfromhash($site::nodeinfo, 'static_master') { - include roles::static_master - } - - if getfromhash($site::nodeinfo, 'static_mirror') { - include roles::static_mirror - } elsif getfromhash($site::nodeinfo, 'static_source') { - include roles::static_source - } - - if getfromhash($site::nodeinfo, 'weblog_provider') { - include roles::weblog_provider - } - if $::hostname in [ravel] { - include roles::weblog_destination + if $::keyring_debian_org_mirror { + include roles::keyring_debian_org_mirror } }