From e509efc1325632fd57e673e810c990e892c04062 Mon Sep 17 00:00:00 2001 From: mergwyn Date: Tue, 11 Jun 2024 14:42:17 +0100 Subject: [PATCH] Chnage path for last_run_summary --- site-modules/profile/manifests/puppet/agent.pp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/site-modules/profile/manifests/puppet/agent.pp b/site-modules/profile/manifests/puppet/agent.pp index 02576d59..676770f1 100644 --- a/site-modules/profile/manifests/puppet/agent.pp +++ b/site-modules/profile/manifests/puppet/agent.pp @@ -6,7 +6,7 @@ include profile::puppet::repo # make sure we match server major version - $ver = split($::serverversion, '\.') + $ver = split($server_facts['serverversion'], '\.') apt::pin { 'puppet': priority => 501, packages => 'puppet-agent', @@ -35,7 +35,7 @@ $ruby = '/opt/puppetlabs/puppet/bin/ruby' #$lastrunfile = "${settings::lastrunfile}" # TODO This gives the wrong value for some reason - $lastrunfile = '/opt/puppetlabs/puppet/cache/state/last_run_summary.yaml' + $lastrunfile = '/opt/puppetlabs/puppet/public/last_run_summary.yaml' $cmd = "${ruby} -rjson -ryaml -e \"puts JSON.pretty_generate(YAML.load_file('${lastrunfile}'))\"" zabbix::userparameters { 'puppet-health': content => "UserParameter=puppet.health[*],sudo ${cmd}\n"