Skip to content

Feature package locking#1243

Closed
lupa95 wants to merge 3 commits intowazuh:masterfrom
lupa95:feature-package-locking
Closed

Feature package locking#1243
lupa95 wants to merge 3 commits intowazuh:masterfrom
lupa95:feature-package-locking

Conversation

@lupa95
Copy link
Copy Markdown

@lupa95 lupa95 commented Mar 13, 2024

This is an attempt at fixing the idempotency issue discussed in #1240.

Packages get version locked and unlocked when installing/updating them, rather than adding and removing the package repositories on each run.

Unfortunately, it requires a module from the community.general collection. I am not sure if you want to introduce this.

Copy link
Copy Markdown

@jonhattan jonhattan left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good to me.

Instead of lock/unlock the package, an alternate approach could be to enable/disable the repo. In the case of apt it should be renaming the sources list file to .disabled or something. Perhaps this is preferred option to the wazuh team.

when:
- ansible_os_family|lower == "redhat"
- "'wazuh-agent' in ansible_facts.packages"
- not ansible_facts.packages['wazuh-agent'][0]['version'].startswith(wazuh_agent_version)
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This could be computed in a fact since it is used twice.

@c-bordon c-bordon deleted the branch wazuh:master February 11, 2025 15:56
@c-bordon c-bordon closed this Feb 11, 2025
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.

4 participants