[Mageia-sysadm] [154] - add puppet module, based on my own setup

root at mageia.org root at mageia.org
Fri Nov 5 19:20:23 CET 2010


Revision: 154
Author:   misc
Date:     2010-11-05 19:20:22 +0100 (Fri, 05 Nov 2010)
Log Message:
-----------
- add puppet module, based on my own setup

Added Paths:
-----------
    puppet/modules/puppet/
    puppet/modules/puppet/manifests/
    puppet/modules/puppet/manifests/init.pp
    puppet/modules/puppet/templates/
    puppet/modules/puppet/templates/puppet.conf

Added: puppet/modules/puppet/manifests/init.pp
===================================================================
--- puppet/modules/puppet/manifests/init.pp	                        (rev 0)
+++ puppet/modules/puppet/manifests/init.pp	2010-11-05 18:20:22 UTC (rev 154)
@@ -0,0 +1,34 @@
+
+class puppet {
+    class client {
+        package { puppet:
+            ensure => installed
+        }
+    
+        service { puppet:
+            ensure => running,
+            subscribe => [ Package[puppet], File["/etc/puppet/puppet.conf"]]
+        }
+
+        file { "/etc/puppet/puppet.conf":
+            ensure => present,
+            owner => root,
+            group => root,
+            mode => 644,
+            content => template("puppet/puppet.conf"),
+            require => Package[puppet]
+        }
+    }
+
+    class master inherits client {
+        package { puppet-server:
+            ensure => installed
+        }
+    
+        service { puppetmaster:
+            ensure => running,
+            path => "/etc/init.d/puppetmaster",
+            subscribe => [ Package[puppet-server], File["/etc/puppet/puppet.conf"]]
+        }
+    }
+}

Added: puppet/modules/puppet/templates/puppet.conf
===================================================================
--- puppet/modules/puppet/templates/puppet.conf	                        (rev 0)
+++ puppet/modules/puppet/templates/puppet.conf	2010-11-05 18:20:22 UTC (rev 154)
@@ -0,0 +1,27 @@
+[main]
+    # The Puppet log directory.
+    # The default value is '$vardir/log'.
+    logdir = /var/log/puppet
+
+    # Where Puppet PID files are kept.
+    # The default value is '$vardir/run'.
+    rundir = /var/run/puppet
+
+    # Where SSL certificates are kept.
+    # The default value is '$confdir/ssl'.
+    ssldir = $vardir/ssl
+
+[puppetd]
+    server = puppetmaster.<%= domain %>
+
+    # The file in which puppetd stores a list of the classes
+    # associated with the retrieved configuratiion.  Can be loaded in
+    # the separate ``puppet`` executable using the ``--loadclasses``
+    # option.
+    # The default value is '$confdir/classes.txt'.
+    classfile = $vardir/classes.txt
+
+    # Where puppetd caches the local configuration.  An
+    # extension indicating the cache format is added automatically.
+    # The default value is '$confdir/localconfig'.
+    localconfig = $vardir/localconfig
-------------- next part --------------
An HTML attachment was scrubbed...
URL: </pipermail/mageia-sysadm/attachments/20101105/f93ae7f2/attachment.html>


More information about the Mageia-sysadm mailing list