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

Change POST | Perform DNF package cleanup task in post.yml to accurately reflect whether leaf packages have been removed or not. #434

Open
tux-repos opened this issue Nov 26, 2024 · 1 comment
Assignees
Labels
enhancement New feature or request

Comments

@tux-repos
Copy link

Feature Request or Enhancement

  • Feature []
  • Enhancement [x]

Summary of Request
Currently this task always returns an "OK" output, regardless of any changes. This means that when leaf packages are removed the output is exactly the same as when no packages are removed, painting an incorrect image of events.

This is because of a 'changed_when' conditional added at the end of the task, see below for my proposed fix.

Suggested Code
Current content post.yml

- name: POST | Perform DNF package cleanup
  ansible.builtin.dnf:
      autoremove: true
  changed_when: false

Proposed post.yml

- name: POST | Perform DNF package cleanup
  ansible.builtin.dnf:
      autoremove: true

Simply removing this line will make this task accurately report whether or not leaf packages have been removed by showing "Changed" when they are and "OK" when no leaf packages have been removed.

@tux-repos tux-repos added the enhancement New feature or request label Nov 26, 2024
@uk-bolly uk-bolly self-assigned this Nov 28, 2024
@uk-bolly
Copy link
Member

hi @tux-repos

Thank you for highlighting this issue. This has now been removed and should be in devel in the next couple of days

Many thanks again

uk-bolly

uk-bolly added a commit that referenced this issue Nov 28, 2024
Signed-off-by: Mark Bolwell <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants