Use native ansible module to control dnf module_hotfixes
This has been possible since ansible 2.11 so we use the built in functionality. This should be idempotent and does not require an additional task. Change-Id: I0bec6f705d0fbc0b593f19100262912f7b0de4c1
This commit is contained in:
parent
7220c76237
commit
c8e9cac60c
|
@ -83,6 +83,7 @@
|
|||
exclude: "{{ repo.exclude | default(omit) }}"
|
||||
priority: "{{ repo.priority | default(99) }}"
|
||||
state: "{{ repo.state | default(omit) }}"
|
||||
module_hotfixes: "{{ repo.module_hotfixes | default(omit) }}"
|
||||
with_items: "{{ openstack_hosts_package_repos }}"
|
||||
loop_control:
|
||||
loop_var: repo
|
||||
|
@ -125,17 +126,6 @@
|
|||
- openstack_hosts_power_tool_enable | bool
|
||||
- ansible_facts['distribution_major_version'] == "9"
|
||||
|
||||
- name: Enable/Disable module_hotfixes
|
||||
lineinfile:
|
||||
dest: "/etc/yum.repos.d/{{ item.file }}.repo"
|
||||
line: "module_hotfixes={{ (item.module_hotfixes | bool) | ternary(1, 0) }}"
|
||||
regexp: "^module_hotfixes"
|
||||
insertafter: '^\[{{ item.name }}\]$'
|
||||
when:
|
||||
- ('module_hotfixes' in item)
|
||||
- (item.state|default('present') == 'present')
|
||||
with_items: "{{ openstack_hosts_package_repos }}"
|
||||
|
||||
- name: Create SSL certificate and key directories
|
||||
file:
|
||||
path: "{{ item.path }}"
|
||||
|
|
Loading…
Reference in New Issue