diff --git a/manifests/main/config.pp b/manifests/main/config.pp index dec6216..3b9fa98 100644 --- a/manifests/main/config.pp +++ b/manifests/main/config.pp @@ -6,7 +6,5 @@ class puppet_cd::main::config ( ) inherits puppet_cd::params { - if $fqdn == $pt_pm_fqdn { - include puppet_cd::server::service - } + include puppet_cd::server::service } diff --git a/manifests/main/files.pp b/manifests/main/files.pp index 854cbda..c113497 100644 --- a/manifests/main/files.pp +++ b/manifests/main/files.pp @@ -15,7 +15,7 @@ class puppet_cd::main::files ( owner => 'root', group => 'root', mode => '0644', - content => template($pt_agent_conf_erb), + content => template($pt_puppet_conf_erb), notify => Service[$pt_agent_service], } } @@ -33,6 +33,7 @@ class puppet_cd::main::files ( } if $pt_use_puppetdb == true { + file { $pt_puppetdb_conf_file: ensure => filet, path => $pt_puppetdb_conf_file, diff --git a/templates/puppet.conf.erb b/templates/puppet.conf.erb index 451d72f..0e6c90c 100644 --- a/templates/puppet.conf.erb +++ b/templates/puppet.conf.erb @@ -52,4 +52,19 @@ <% if @pt_use_puppetdb == true %> storeconfigs = true storeconfigs_backend = <%= @pt_storeconfigs_backend %> -<% end end -%> \ No newline at end of file +<% end end -%> +<% if @fqdn != @pt_pm_fqdn -%> +[agent] + server = <%= @pt_pm_fqdn %> + classfile = $statedir/classes.txt + default_schedules = <%= @pt_default_schedules %> + environment = <%= @pt_environment %> + masterport = <%= @pt_masterport %> + noop = <%= @pt_noop %> + pluginsync = <%= @pt_pluginsync %> + report = <%= @pt_report %> + runinterval = <%= @pt_runinterval %> + splay = <%= @pt_splay %> + splaylimit = <%= @pt_splaylimit %> + usecacheonfailure = <%= @pt_usecacheonfailure %> +<% end %> \ No newline at end of file