We seem to be getting intermittent errors production this message.
err: Failed to apply catalog: Could not find dependency
Package[zabbix-agent] for Service[undef] at
/etc/puppet/modules/zabbix-agent/manifests/init.pp:76
It will usually work OK on the next rerun. The class is addressing a
service that was zabbix-agent prior to version 1.8.9 but was renamed to
zabbix-agent. I am puzzled that "undef" can result in the if / else as
it's set in either case. (Copy paste changed some indentation)
Puppet version is 2.7.9, OS RHEL, some 5 and 6, which doesn't seem to
matter, and the error occurs on hosts running either zabbix version.
Any thoughts? Doc follows
This uses a custom fact:
Facter.add(:zabbix_version) do
setcode do
output = %x{/bin/rpm -qa --queryformat "%{VERSION}" zabbix-agent}
end
end
Parts of the manifest
<snip>
if versioncmp($zabbix_version, '1.8.9') >= 0 {
$packages = [ "zabbix-agent", "zabbix-get", "zabbix-sender" ]
$agent = "zabbix-agentd" }
else {
$packages = [ "zabbix-agent" ]
$agent = "zabbix-agent"
}
<snip>
service {
$agent:
enable => true,
ensure => running,
hasstatus => true,
require => Package["zabbix-agent"];
} # This is line 76
--
You received this message because you are subscribed to the Google Groups
"Puppet Users" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to
[email protected].
For more options, visit this group at
http://groups.google.com/group/puppet-users?hl=en.