fix: add metadata cleanup handler
All checks were successful
continuous-integration/drone/push Build is passing

This commit is contained in:
Robert Kaussow 2023-09-07 21:49:15 +02:00
parent 2e81c2067e
commit b7357283e3
Signed by: xoxys
GPG Key ID: 4E692A2EAECC03C0
2 changed files with 10 additions and 1 deletions

View File

@ -10,3 +10,9 @@
- skip_ansible_later - skip_ansible_later
become: True become: True
become_user: root become_user: root
- name: Clean metadata cache
command: dnf clean metadata
listen: __packages_clean_metadata
become: True
become_user: root

View File

@ -7,6 +7,7 @@
loop: "{{ packages_repofiles_remove }}" loop: "{{ packages_repofiles_remove }}"
loop_control: loop_control:
label: "/etc/yum.repos.d/{{ item }}" label: "/etc/yum.repos.d/{{ item }}"
notify: __packages_clean_metadata
- name: Add common repositories - name: Add common repositories
yum_repository: yum_repository:
@ -22,7 +23,9 @@
loop: "{{ packages_yum_repositories + packages_yum_repositories_extra }}" loop: "{{ packages_yum_repositories + packages_yum_repositories_extra }}"
loop_control: loop_control:
label: "{{ item.name }}" label: "{{ item.name }}"
notify: __packages_upgrade notify:
- __packages_upgrade
- __packages_clean_metadata
- name: Uninstall packages - name: Uninstall packages
package: package: