diff --git a/manifests/init.pp b/manifests/init.pp index 3ca4ab4..85476ad 100644 --- a/manifests/init.pp +++ b/manifests/init.pp @@ -33,6 +33,8 @@ class puppet ( $reports = 'store,puppetdb', $agent_runinterval = 600, $puppet_release = $::lsbdistcodename, + $is_master = false, + $is_masterless = false, ) { # pin facter and puppetdb according to puppet version diff --git a/templates/puppet.conf.erb b/templates/puppet.conf.erb index dbb807a..acf7e7d 100644 --- a/templates/puppet.conf.erb +++ b/templates/puppet.conf.erb @@ -20,6 +20,7 @@ server=<%= @puppetmaster_server %> certname=<%= @certname %> pluginsync=true +<% if @is_master -%> [master] # These are needed when the puppetmaster is run by passenger # and can safely be removed if webrick is used. @@ -33,7 +34,9 @@ reports=<%= @reports %> storeconfigs = <%= @store_configs %> storeconfigs_backend = <%= @store_backend %> basemodulepath = <%= @basemodule_path %> +<% end %> +<% if ! @is_masterless -%> [agent] report=true splay = true @@ -43,3 +46,4 @@ runinterval = <%= @agent_runinterval %> http_proxy_host=<%= @agent_http_proxy_host %> http_proxy_port=<%= @agent_http_proxy_port %> <% end %> +<% end %>