Open coreone opened 1 week ago
Hi @coreone have you tried with zabbix::agent::zabbix_package_state: purged
?
I have done that, and it removes the package(s), but it doesn't remove the config file. Normally, I would just leave the config file there, but when you apply the agent class with the following parameters to a host that hasn't had any packages installed, it causes a runtime error when applying the catalog because the /etc/zabbix
directory doesn't exist (because the package doesn't exist, and that's what creates the directory) and it still tries to write the config file.
manage_repo => false,
service_enable => false,
service_ensure => 'stopped',
zabbix_package_state => 'absent',
Pull Request (PR) description
Add the ability to remove the Zabbix agent from a system using the
ensure
parameter.feat: add tests for new "ensure" parameter in zabbix::agent