Ansible core 2.20 fixes
Signed-off-by: Jason Rothstein <fdragon@fdragon.org>
This commit is contained in:
+20
-20
@@ -2,36 +2,36 @@
|
||||
# tasks file for ensure_os_upgrade
|
||||
- name: 'include variables'
|
||||
when:
|
||||
- ansible_system == 'Linux'
|
||||
- ansible_facts["system"] == 'Linux'
|
||||
include_vars:
|
||||
file: '{{ lookup("first_found", findme ) }}'
|
||||
name: 'ensure_os_upgrade'
|
||||
vars:
|
||||
findme:
|
||||
files:
|
||||
- '{{ ansible_distribution }}-{{ ansible_distribution_major_version }}-{{ ansible_architecture }}.yml'
|
||||
- '{{ ansible_distribution }}-{{ ansible_distribution_major_version }}-default.yml'
|
||||
- '{{ ansible_distribution }}-default.yml'
|
||||
- '{{ ansible_os_family }}-{{ ansible_distribution_major_version }}-{{ ansible_architecture }}.yml'
|
||||
- '{{ ansible_os_family }}-{{ ansible_distribution_major_version }}-default.yml'
|
||||
- '{{ ansible_os_family }}-default.yml'
|
||||
- '{{ ansible_facts["distribution"] }}-{{ ansible_facts["distribution_major_version"] }}-{{ ansible_facts["architecture"] }}.yml'
|
||||
- '{{ ansible_facts["distribution"] }}-{{ ansible_facts["distribution_major_version"] }}-default.yml'
|
||||
- '{{ ansible_facts["distribution"] }}-default.yml'
|
||||
- '{{ ansible_facts["os_family"] }}-{{ ansible_facts["distribution_major_version"] }}-{{ ansible_facts["architecture"] }}.yml'
|
||||
- '{{ ansible_facts["os_family"] }}-{{ ansible_facts["distribution_major_version"] }}-default.yml'
|
||||
- '{{ ansible_facts["os_family"] }}-default.yml'
|
||||
- 'default.yml'
|
||||
paths:
|
||||
- '../vars/'
|
||||
errors: 'ignore'
|
||||
- name: 'package discovery'
|
||||
when:
|
||||
- ansible_system == 'Linux'
|
||||
- ansible_facts["system"] == 'Linux'
|
||||
- packages is not defined
|
||||
ansible.builtin.package_facts:
|
||||
- name: 'service discovery'
|
||||
when:
|
||||
- ansible_system == 'Linux'
|
||||
- ansible_facts["system"] == 'Linux'
|
||||
- services is not defined
|
||||
ansible.builtin.service_facts:
|
||||
- name: 'ensure packages'
|
||||
when:
|
||||
- ansible_system == 'Linux'
|
||||
- ansible_facts["system"] == 'Linux'
|
||||
- ensure_os_upgrade is defined
|
||||
- ensure_os_upgrade.package_list is defined
|
||||
- ensure_os_upgrade.package_list is iterable
|
||||
@@ -46,7 +46,7 @@
|
||||
- 'ensure_os_upgrade.service_facts'
|
||||
- name: 'ensure services'
|
||||
when:
|
||||
- ansible_system == 'Linux'
|
||||
- ansible_facts["system"] == 'Linux'
|
||||
- ensure_os_upgrade is defined
|
||||
- ensure_os_upgrade.service_list is defined
|
||||
- ensure_os_upgrade.service_list is iterable
|
||||
@@ -62,37 +62,37 @@
|
||||
- 'ensure_os_upgrade.service_facts'
|
||||
- name: 'Ensure system-upgrade download'
|
||||
when:
|
||||
- ansible_system == 'Linux'
|
||||
- ansible_distribution == 'Fedora'
|
||||
- ansible_facts["system"] == 'Linux'
|
||||
- ansible_facts["distribution"] == 'Fedora'
|
||||
- ensure_os_upgrade is defined
|
||||
- ensure_os_upgrade.package_list is defined
|
||||
- ensure_os_upgrade.package_list is iterable
|
||||
- ensure_os_upgrade.target_version is defined
|
||||
- ansible_distribution_major_version|int < ensure_os_upgrade.target_version|int
|
||||
- ansible_facts["distribution_major_version"]|int < ensure_os_upgrade.target_version|int
|
||||
ansible.builtin.shell: >
|
||||
dnf -y system-upgrade download --refresh --releasever={{ ensure_os_upgrade.target_version|int }}
|
||||
- name: 'Ensure system-upgrade reboot'
|
||||
when:
|
||||
- ansible_system == 'Linux'
|
||||
- ansible_distribution == 'Fedora'
|
||||
- ansible_facts["system"] == 'Linux'
|
||||
- ansible_facts["distribution"] == 'Fedora'
|
||||
- ensure_os_upgrade is defined
|
||||
- ensure_os_upgrade.package_list is defined
|
||||
- ensure_os_upgrade.package_list is iterable
|
||||
- ensure_os_upgrade.target_version is defined
|
||||
- ansible_distribution_major_version|int < ensure_os_upgrade.target_version|int
|
||||
- ansible_facts["distribution_major_version"]|int < ensure_os_upgrade.target_version|int
|
||||
async: '1'
|
||||
poll: '0'
|
||||
ansible.builtin.shell: >
|
||||
sleep 5 && dnf -y system-upgrade reboot
|
||||
- name: 'Wait for the reboot'
|
||||
when:
|
||||
- ansible_system == 'Linux'
|
||||
- ansible_distribution == 'Fedora'
|
||||
- ansible_facts["system"] == 'Linux'
|
||||
- ansible_facts["distribution"] == 'Fedora'
|
||||
- ensure_os_upgrade is defined
|
||||
- ensure_os_upgrade.package_list is defined
|
||||
- ensure_os_upgrade.package_list is iterable
|
||||
- ensure_os_upgrade.target_version is defined
|
||||
- ansible_distribution_major_version|int < ensure_os_upgrade.target_version|int
|
||||
- ansible_facts["distribution_major_version"]|int < ensure_os_upgrade.target_version|int
|
||||
ansible.builtin.wait_for:
|
||||
connect_timeout: '5'
|
||||
delay: '300'
|
||||
|
||||
@@ -3,4 +3,6 @@
|
||||
package_list:
|
||||
- name: 'dnf-plugin-system-upgrade'
|
||||
state: 'present'
|
||||
target_version: '24'
|
||||
target_version: '24'
|
||||
...
|
||||
|
||||
|
||||
@@ -3,4 +3,6 @@
|
||||
package_list:
|
||||
- name: 'dnf-plugin-system-upgrade'
|
||||
state: 'present'
|
||||
target_version: '25'
|
||||
target_version: '25'
|
||||
...
|
||||
|
||||
|
||||
@@ -3,4 +3,6 @@
|
||||
package_list:
|
||||
- name: 'dnf-plugin-system-upgrade'
|
||||
state: 'present'
|
||||
target_version: '26'
|
||||
target_version: '26'
|
||||
...
|
||||
|
||||
|
||||
@@ -3,4 +3,6 @@
|
||||
package_list:
|
||||
- name: 'dnf-plugin-system-upgrade'
|
||||
state: 'present'
|
||||
target_version: '27'
|
||||
target_version: '27'
|
||||
...
|
||||
|
||||
|
||||
@@ -3,4 +3,6 @@
|
||||
package_list:
|
||||
- name: 'dnf-plugin-system-upgrade'
|
||||
state: 'present'
|
||||
target_version: '28'
|
||||
target_version: '28'
|
||||
...
|
||||
|
||||
|
||||
@@ -3,4 +3,6 @@
|
||||
package_list:
|
||||
- name: 'dnf-plugin-system-upgrade'
|
||||
state: 'present'
|
||||
target_version: '29'
|
||||
target_version: '29'
|
||||
...
|
||||
|
||||
|
||||
@@ -3,4 +3,6 @@
|
||||
package_list:
|
||||
- name: 'dnf-plugin-system-upgrade'
|
||||
state: 'present'
|
||||
target_version: '30'
|
||||
target_version: '30'
|
||||
...
|
||||
|
||||
|
||||
@@ -3,4 +3,6 @@
|
||||
package_list:
|
||||
- name: 'dnf-plugin-system-upgrade'
|
||||
state: 'present'
|
||||
target_version: '31'
|
||||
target_version: '31'
|
||||
...
|
||||
|
||||
|
||||
@@ -3,4 +3,6 @@
|
||||
package_list:
|
||||
- name: 'dnf-plugin-system-upgrade'
|
||||
state: 'present'
|
||||
target_version: '32'
|
||||
target_version: '32'
|
||||
...
|
||||
|
||||
|
||||
@@ -3,4 +3,6 @@
|
||||
package_list:
|
||||
- name: 'dnf-plugin-system-upgrade'
|
||||
state: 'present'
|
||||
target_version: '33'
|
||||
target_version: '33'
|
||||
...
|
||||
|
||||
|
||||
@@ -3,4 +3,6 @@
|
||||
package_list:
|
||||
- name: 'dnf-plugin-system-upgrade'
|
||||
state: 'present'
|
||||
target_version: '34'
|
||||
target_version: '34'
|
||||
...
|
||||
|
||||
|
||||
@@ -4,3 +4,5 @@ package_list:
|
||||
- name: 'dnf-plugin-system-upgrade'
|
||||
state: 'present'
|
||||
target_version: '35'
|
||||
...
|
||||
|
||||
|
||||
@@ -4,3 +4,5 @@ package_list:
|
||||
- name: 'dnf-plugin-system-upgrade'
|
||||
state: 'present'
|
||||
target_version: '36'
|
||||
...
|
||||
|
||||
|
||||
@@ -4,3 +4,5 @@ package_list:
|
||||
- name: 'dnf-plugin-system-upgrade'
|
||||
state: 'present'
|
||||
target_version: '37'
|
||||
...
|
||||
|
||||
|
||||
@@ -4,3 +4,5 @@ package_list:
|
||||
- name: 'dnf-plugin-system-upgrade'
|
||||
state: 'present'
|
||||
target_version: '38'
|
||||
...
|
||||
|
||||
|
||||
@@ -4,3 +4,5 @@ package_list:
|
||||
- name: 'dnf-plugin-system-upgrade'
|
||||
state: 'present'
|
||||
target_version: '39'
|
||||
...
|
||||
|
||||
|
||||
@@ -4,3 +4,5 @@ package_list:
|
||||
- name: 'dnf-plugin-system-upgrade'
|
||||
state: 'present'
|
||||
target_version: '40'
|
||||
...
|
||||
|
||||
|
||||
@@ -4,3 +4,5 @@ package_list:
|
||||
- name: 'dnf-plugin-system-upgrade'
|
||||
state: 'present'
|
||||
target_version: '41'
|
||||
...
|
||||
|
||||
|
||||
@@ -4,3 +4,5 @@ package_list:
|
||||
- name: 'dnf-plugin-system-upgrade'
|
||||
state: 'present'
|
||||
target_version: '42'
|
||||
...
|
||||
|
||||
|
||||
Reference in New Issue
Block a user