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

Fixes #38137 - Do not double-escape * during package update #11273

Conversation

hairmare
Copy link
Contributor

What are the changes introduced in this pull request?

Update the "Update packages by search query - Katello Ansible Default" template to pass a simple * instead of "*" to the upstream "Package Action - Ansible Default" template. This makes it possible to upgrade all packages via Ansible using Katello 4.14 (and other versions).

The current template is erroring out:

fatal: [test-vm-01.example.org]: FAILED! => {"changed": false, "failures": ["No package \"*\" available."], "msg": "Failed to install some of the specified packages", "rc": 1, "results": []}

Considerations taken when implementing this change?

  • I tried to fix this as early as possible in the template call tree, to keep the change as minimal as possible.
  • The change has been working well on my production for a while. Most likely other users have heavier customizations to the scripts.

What are the testing steps for this pull request?

  1. Configure Foreman/Katello to use Ansible for all actions
  2. Select all upgradable packages for a host in the UI, and "Upgrade" all the packages through REX
  3. It updates all packages and doesn't fail

@hairmare hairmare marked this pull request as ready for review December 22, 2024 18:26
@chris1984
Copy link
Member

Looks pretty straighforward, will add it to our board to review

@chris1984
Copy link
Member

chris1984 commented Jan 14, 2025

@hairmare can you update the commit and pr message to this:

Fixes #38137 - Do not double-escape * during package update

Once that is in, I will merge it in since I tested it and it works fine.

I created an issue for you - https://projects.theforeman.org/issues/38137

@hairmare hairmare force-pushed the fix/template/job_templates/update-packages-by-search-query-ansible/install-all-packages branch from 84d31c3 to 280b069 Compare January 15, 2025 17:54
@hairmare hairmare changed the title fix: Do not double-escape * during package update Fixes #38137 - Do not double-escape * during package update Jan 15, 2025
@hairmare
Copy link
Contributor Author

@chris1984 Thank you for creating the issue.

I rebased the PR and updated the commit message.

@chris1984 chris1984 merged commit fcd6cdb into Katello:master Jan 16, 2025
19 checks passed
@hairmare hairmare deleted the fix/template/job_templates/update-packages-by-search-query-ansible/install-all-packages branch January 16, 2025 19:49
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