Skip to content

feat: allow uninstalling the Zabbix agent#959

Open
coreone wants to merge 1 commit intovoxpupuli:masterfrom
broadinstitute:rm_agent
Open

feat: allow uninstalling the Zabbix agent#959
coreone wants to merge 1 commit intovoxpupuli:masterfrom
broadinstitute:rm_agent

Conversation

@coreone
Copy link
Copy Markdown

@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
Copy Markdown
Contributor

Valantin commented Jun 26, 2024

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

@coreone
Copy link
Copy Markdown
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