aboutsummaryrefslogtreecommitdiff
path: root/manifests/master.pp
diff options
context:
space:
mode:
authorSilvio Rhatto <rhatto@riseup.net>2010-03-22 22:11:47 -0300
committerSilvio Rhatto <rhatto@riseup.net>2010-03-22 22:11:47 -0300
commit1b44048f33e795162212d2fdc77bcf0d9cdf0533 (patch)
treea854d2e5c1abbaba5eeff0d719df2a827c71a9ba /manifests/master.pp
parent7433f4dfc9ea4056871ef273368e9826ccf38517 (diff)
downloadpuppet-nodo-1b44048f33e795162212d2fdc77bcf0d9cdf0533.tar.gz
puppet-nodo-1b44048f33e795162212d2fdc77bcf0d9cdf0533.tar.bz2
Module organization
Diffstat (limited to 'manifests/master.pp')
-rw-r--r--manifests/master.pp48
1 files changed, 48 insertions, 0 deletions
diff --git a/manifests/master.pp b/manifests/master.pp
new file mode 100644
index 0000000..b07866e
--- /dev/null
+++ b/manifests/master.pp
@@ -0,0 +1,48 @@
+class nodo::master {
+ # Puppetmaster should be included before nodo::vserver
+ include puppetmasterd
+ include nodo::vserver
+ include database
+ include gitosis
+ include websites::admin
+
+ case $main_master {
+ '': { fail("You need to define if this is the main master! Please set \$main_master in host config") }
+ }
+
+ if $main_master == true {
+ include munin::host
+
+ # The main master has a host entry pointing to itself, other
+ # masters still retrieve catalogs from the main master.
+ host { "puppet":
+ ensure => present,
+ ip => "127.0.0.1",
+ alias => ["puppet.$domain"],
+ }
+ } else {
+ host { "puppet":
+ ensure => absent,
+ }
+ }
+
+ case $puppetmaster_db_password {
+ '': { fail("Please set \$puppetmaster_db_password in your host config") }
+ }
+
+ # update master's puppet.conf if you change here
+ database::instance { "puppet":
+ password => "$puppetmaster_db_password",
+ }
+
+ backupninja::mysql { "all_databases":
+ backupdir => '/var/backups/mysql',
+ compress => true,
+ sqldump => true,
+ }
+
+ # used for trac dependency graphs
+ package { "graphviz":
+ ensure => present,
+ }
+}