Replace dnf by tripleo_dnf_stream for updates.

In the minor update workflow, we were using the dnf Ansible
module to ensure that the right streams were enabled. However,
the dnf Ansible module doesn't only enable the stream, but
synchronizes the whole content. Installing packages which were
not installed before the update.

This patch replaces the dnf Ansible module by a custom tripleo
module, tripleo_dnf_stream, which will only enable the stream
(if the stream wasn't enabled). Letting the minor update's
workflow 'dnf update *' take care of installing the packages.

Change-Id: I3fa4ccc224cf510bcc85a9c86a2b4f0d367c687f
Related-bug: rhbz#1963164
This commit is contained in:
Jose Luis Franco Arza 2022-02-14 12:12:50 +01:00
parent 6e31f952e3
commit 5746310b69
1 changed files with 4 additions and 4 deletions

View File

@ -389,12 +389,12 @@ outputs:
- step|int == 0
- ansible_facts['distribution'] == 'RedHat'
- not (skip_rhel_enforcement | bool)
- name: Ensure DNF modules have the right stream
- name: Ensure DNF modules have the right stream enabled
vars:
dnf_module_list: {get_attr: [RoleParametersValue, value, 'dnf_module_list']}
dnf:
name: "@{{ item.module }}:{{ item.stream }}/{{ item.profile|default('common') }}"
state: present
tripleo_dnf_stream:
name: "{{ item.module }}:{{ item.stream }}"
state: enabled
loop: "{{ dnf_module_list|list }}"
when:
- step|int == 0