Puppet is trying to start the service when the package is purged.
As a test I configured the package to be purged. But the service section is trying to start the zabbix-agent service. Any idea what went wrong?..
package { 'zabbix-agent':
name => $service_name,
ensure => purged,
}
service { 'zabbix-agent':
name => $service_name,
ensure => running,
enable => true,
require => Package['zabbix-agent'],
subscribe => File['zabbix-agentd.conf'],
}
puppet agent -t
output:
Error: Could not start Service[zabbix-agent]: Execution of '/bin/systemctl start zabbix-agent' returned 5: Failed to start zabbix-agent.service: Unit zabbix-agent.service not found.
Error: /Stage[main]/Zabbix/Service[zabbix-agent]/ensure: change from stopped to running failed: Could not start Service[zabbix-agent]: Execution of '/bin/systemctl start zabbix-agent' returned 5: Failed to start zabbix-agent.service: Unit zabbix-agent.service not found.
Notice: Finished catalog run in 0.25 seconds