From 911337e91c6a34d9fca8ba9095b8c3864571cc5b Mon Sep 17 00:00:00 2001 From: Silvio Rhatto Date: Wed, 16 Feb 2011 21:26:28 -0200 Subject: Setting name of puppet agent section in config file --- manifests/puppetd.pp | 6 ++++++ templates/puppet-node.conf.erb | 2 +- 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/manifests/puppetd.pp b/manifests/puppetd.pp index 0cd7434..090aeaa 100644 --- a/manifests/puppetd.pp +++ b/manifests/puppetd.pp @@ -30,6 +30,12 @@ class puppetd inherits puppet { require => [ Package["puppet"], File["/etc/default/puppet"] ], } + # name of puppet agent section in config file + $puppet_agent_section = $lsbdistcodename ? { + 'lenny','lucid' => 'puppetd', + default => 'agent', + } + # default config file for puppet nodes if ($puppetmasterd_present != true) or ($main_master != true) { file { "/etc/puppet/puppet.conf": diff --git a/templates/puppet-node.conf.erb b/templates/puppet-node.conf.erb index 0a1943c..033c2e5 100644 --- a/templates/puppet-node.conf.erb +++ b/templates/puppet-node.conf.erb @@ -6,7 +6,7 @@ rundir = /var/run/puppet factpath = $vardir/lib/facter pluginsync = true -[agent] +[<%= puppet_agent_section %>] vardir = /var/lib/puppet ssldir = $vardir/ssl server = puppet.<%= domain %> -- cgit v1.2.3