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

Fix generate wazuh-keystore execs #1176

Open
pearsondavid opened this issue Nov 26, 2024 · 0 comments
Open

Fix generate wazuh-keystore execs #1176

pearsondavid opened this issue Nov 26, 2024 · 0 comments

Comments

@pearsondavid
Copy link

pearsondavid commented Nov 26, 2024

The following Exec resources are executed on each puppet run, which seems unnecessary.

Notice: /Stage[main]/Wazuh::Manager/Exec[Generate the wazuh-keystore (username)]/returns: executed successfully (corrective)
Notice: /Stage[main]/Wazuh::Manager/Exec[Generate the wazuh-keystore (password)]/returns: executed successfully (corrective)

https://github.com/wazuh/wazuh-puppet/blob/master/manifests/manager.pp#L605-L613

The use of onlyif or unless might be suitable to check the state of the target system.

https://www.puppet.com/docs/puppet/7/types/exec.html#exec-attribute-onlyif
https://www.puppet.com/docs/puppet/8/types/exec.html#exec-attribute-unless

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

No branches or pull requests

1 participant