Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: allow uninstalling the Zabbix agent #959

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

coreone
Copy link

@coreone coreone commented Jun 25, 2024

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

feat: add tests for new "ensure" parameter in zabbix::agent
@Valantin
Copy link
Contributor

Valantin commented Jun 26, 2024

Hi @coreone have you tried with zabbix::agent::zabbix_package_state: purged ?

@coreone
Copy link
Author

coreone commented Jun 28, 2024

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',

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants