diff options
author | Michael Scherer <misc@mageia.org> | 2012-02-10 22:18:16 +0000 |
---|---|---|
committer | Michael Scherer <misc@mageia.org> | 2012-02-10 22:18:16 +0000 |
commit | 07a9c48a5a1a1ea011adc4e13e1663787ca0ba46 (patch) | |
tree | 88f864b37e887a9d8bc292ddb81cef4eb0e50a80 /modules/puppet | |
parent | 82138c7590284c843f54212d946e6debde7fa6dc (diff) | |
download | puppet-07a9c48a5a1a1ea011adc4e13e1663787ca0ba46.tar puppet-07a9c48a5a1a1ea011adc4e13e1663787ca0ba46.tar.gz puppet-07a9c48a5a1a1ea011adc4e13e1663787ca0ba46.tar.bz2 puppet-07a9c48a5a1a1ea011adc4e13e1663787ca0ba46.tar.xz puppet-07a9c48a5a1a1ea011adc4e13e1663787ca0ba46.zip |
split puppet.conf template file, and reorganize the module so we don't install rails on every client
Diffstat (limited to 'modules/puppet')
-rw-r--r-- | modules/puppet/manifests/client.pp | 3 | ||||
-rw-r--r-- | modules/puppet/manifests/master.pp | 10 | ||||
-rw-r--r-- | modules/puppet/manifests/stored_config.pp | 2 | ||||
-rw-r--r-- | modules/puppet/templates/puppet.agent.conf | 25 | ||||
-rw-r--r-- | modules/puppet/templates/puppet.conf | 39 | ||||
-rw-r--r-- | modules/puppet/templates/puppet.master.conf | 14 |
6 files changed, 51 insertions, 42 deletions
diff --git a/modules/puppet/manifests/client.pp b/modules/puppet/manifests/client.pp index 6fa166d2..2969ad2d 100644 --- a/modules/puppet/manifests/client.pp +++ b/modules/puppet/manifests/client.pp @@ -1,9 +1,10 @@ class puppet::client { include puppet::stored_config + package { 'puppet': } file { '/etc/puppet/puppet.conf': - content => template('puppet/puppet.conf'), + content => template('puppet/puppet.conf','puppet/puppet.agent.conf'), require => Package[puppet], } diff --git a/modules/puppet/manifests/master.pp b/modules/puppet/manifests/master.pp index 454c914f..4997c90b 100644 --- a/modules/puppet/manifests/master.pp +++ b/modules/puppet/manifests/master.pp @@ -1,6 +1,16 @@ class puppet::master { include puppet::client include puppet::queue + include puppet::stored_config + + package { ["ruby-$puppet::stored_config::database", 'ruby-rails']: } + + File['/etc/puppet/puppet.conf'] { + content => template('puppet/puppet.conf', + 'puppet/puppet.agent.conf', + 'puppet/puppet.master.conf'), + } + # rails and sqlite3 are used for stored config package { 'puppet-server': } diff --git a/modules/puppet/manifests/stored_config.pp b/modules/puppet/manifests/stored_config.pp index 9a7cb534..b09b59e2 100644 --- a/modules/puppet/manifests/stored_config.pp +++ b/modules/puppet/manifests/stored_config.pp @@ -21,7 +21,5 @@ class puppet::stored_config { $database = 'sqlite3' # } # - package { ["ruby-$database", 'ruby-rails']: } - $db_config = template('puppet/db_config.pp') } diff --git a/modules/puppet/templates/puppet.agent.conf b/modules/puppet/templates/puppet.agent.conf new file mode 100644 index 00000000..957d6e73 --- /dev/null +++ b/modules/puppet/templates/puppet.agent.conf @@ -0,0 +1,25 @@ +[agent] + server = puppet.<%= domain %> + + pluginsync = true + + # unfortunately, ecosse and jonund sync at the same time, thus causing problem + # the proper fix is to use something else than sqlite for stored config, but this would + # take more time to deploy, so the quick fix is this one (misc, 04/07/2011) + splay = true + + report = true +<% if environment %> + environment = <%= environment %> +<% end %> + # 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 diff --git a/modules/puppet/templates/puppet.conf b/modules/puppet/templates/puppet.conf index 2be6e45d..fdda64ab 100644 --- a/modules/puppet/templates/puppet.conf +++ b/modules/puppet/templates/puppet.conf @@ -17,43 +17,4 @@ queue_source = stomp://localhost:61613 <%= db_config %> -[master] - certname = puppet.<%= domain %> - # tagmail should be kept last, until this bug is fixed - # https://projects.puppetlabs.com/issues/5018 - reports = store,socket,tagmail - reportfrom = root@<%= domain %> - - # Never remove this: - # Store config is used to populate others configs - storeconfigs = true - async_storeconfigs = true -<%= db_config %> - - -[agent] - server = puppet.<%= domain %> - - pluginsync = true - - # unfortunately, ecosse and jonund sync at the same time, thus causing problem - # the proper fix is to use something else than sqlite for stored config, but this would - # take more time to deploy, so the quick fix is this one (misc, 04/07/2011) - splay = true - - report = true -<% if environment %> - environment = <%= environment %> -<% end %> - # 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 diff --git a/modules/puppet/templates/puppet.master.conf b/modules/puppet/templates/puppet.master.conf new file mode 100644 index 00000000..0180fc2a --- /dev/null +++ b/modules/puppet/templates/puppet.master.conf @@ -0,0 +1,14 @@ +<% db_config = scope.lookupvar('puppet::stored_config::db_config') %> +[master] + certname = puppet.<%= domain %> + + # tagmail should be kept last, until this bug is fixed + # https://projects.puppetlabs.com/issues/5018 + reports = store,socket,tagmail + reportfrom = root@<%= domain %> + + # Never remove this: + # Store config is used to populate others configs + storeconfigs = true + async_storeconfigs = true +<%= db_config %> |