From 7271afe02df648d61fbdab8357e196938a1ff34c Mon Sep 17 00:00:00 2001 From: Arne Teuke Date: Wed, 26 Feb 2025 21:45:45 +0100 Subject: [PATCH] update erb --- manifests/main/files.pp | 2 +- manifests/params.pp | 1 + templates/agent.conf.erb | 17 +++++++++++++++++ templates/puppet.conf.erb | 17 +---------------- 4 files changed, 20 insertions(+), 17 deletions(-) create mode 100644 templates/agent.conf.erb diff --git a/manifests/main/files.pp b/manifests/main/files.pp index d2f7660..854cbda 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_puppet_conf_erb), + content => template($pt_agent_conf_erb), notify => Service[$pt_agent_service], } } diff --git a/manifests/params.pp b/manifests/params.pp index 5136087..9c1ae6c 100644 --- a/manifests/params.pp +++ b/manifests/params.pp @@ -138,6 +138,7 @@ class puppet_cd::params ( ## puppet $pt_puppet_conf_file = "${pt_puppetdir}/puppet.conf" $pt_puppet_conf_erb = 'puppet_cd/puppet.conf.erb' + $pt_agent_conf_erb = 'puppet_cd/agent.conf.erb' $pt_hiera_config = "${pt_puppetdir}/hiera.yaml" ## puppetdb $pt_bootstrap_conf = "${pt_puppetdb_main}/bootstrap.cfg" diff --git a/templates/agent.conf.erb b/templates/agent.conf.erb new file mode 100644 index 0000000..28503f8 --- /dev/null +++ b/templates/agent.conf.erb @@ -0,0 +1,17 @@ +############################################################################### +########## puppet.conf generated by puppet ########### +############################################################################### + +[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 %> \ No newline at end of file diff --git a/templates/puppet.conf.erb b/templates/puppet.conf.erb index 0e6c90c..451d72f 100644 --- a/templates/puppet.conf.erb +++ b/templates/puppet.conf.erb @@ -52,19 +52,4 @@ <% if @pt_use_puppetdb == true %> storeconfigs = true storeconfigs_backend = <%= @pt_storeconfigs_backend %> -<% 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 +<% end end -%> \ No newline at end of file