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:
@@ -83,6 +83,7 @@
|
|||||||
exclude: "{{ repo.exclude | default(omit) }}"
|
exclude: "{{ repo.exclude | default(omit) }}"
|
||||||
priority: "{{ repo.priority | default(99) }}"
|
priority: "{{ repo.priority | default(99) }}"
|
||||||
state: "{{ repo.state | default(omit) }}"
|
state: "{{ repo.state | default(omit) }}"
|
||||||
|
module_hotfixes: "{{ repo.module_hotfixes | default(omit) }}"
|
||||||
with_items: "{{ openstack_hosts_package_repos }}"
|
with_items: "{{ openstack_hosts_package_repos }}"
|
||||||
loop_control:
|
loop_control:
|
||||||
loop_var: repo
|
loop_var: repo
|
||||||
@@ -125,17 +126,6 @@
|
|||||||
- openstack_hosts_power_tool_enable | bool
|
- openstack_hosts_power_tool_enable | bool
|
||||||
- ansible_facts['distribution_major_version'] == "9"
|
- 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
|
- name: Create SSL certificate and key directories
|
||||||
file:
|
file:
|
||||||
path: "{{ item.path }}"
|
path: "{{ item.path }}"
|
||||||
|
|||||||
Reference in New Issue
Block a user