Fix ansible core 2.20 changes and remove OS that are out of support
Signed-off-by: Jason Rothstein <fdragon@fdragon.org>
This commit is contained in:
@@ -2,8 +2,8 @@
|
|||||||
# tasks file for ensure_os_patch
|
# tasks file for ensure_os_patch
|
||||||
- name: 'ensure Debian patch'
|
- name: 'ensure Debian patch'
|
||||||
when:
|
when:
|
||||||
- ansible_system == 'Linux'
|
- ansible_facts["system"] == 'Linux'
|
||||||
- ansible_pkg_mgr == 'apt'
|
- ansible_facts["pkg_mgr"]== 'apt'
|
||||||
ansible.builtin.apt:
|
ansible.builtin.apt:
|
||||||
autoclean: 'yes'
|
autoclean: 'yes'
|
||||||
autoremove: 'yes'
|
autoremove: 'yes'
|
||||||
@@ -13,4 +13,5 @@
|
|||||||
- 'ensure_os_patch.service_facts'
|
- 'ensure_os_patch.service_facts'
|
||||||
- name: 'flush handlers'
|
- name: 'flush handlers'
|
||||||
meta: 'flush_handlers'
|
meta: 'flush_handlers'
|
||||||
|
...
|
||||||
|
|
||||||
|
|||||||
+22
-22
@@ -2,52 +2,52 @@
|
|||||||
# tasks file for ensure_os_patch
|
# tasks file for ensure_os_patch
|
||||||
- name: 'include vendor / version specific tasks'
|
- name: 'include vendor / version specific tasks'
|
||||||
when:
|
when:
|
||||||
- ansible_system == 'Linux'
|
- ansible_facts["system"] == 'Linux'
|
||||||
include_tasks:
|
include_tasks:
|
||||||
file: '{{ lookup("first_found", findme ) }}'
|
file: '{{ lookup("first_found", findme ) }}'
|
||||||
vars:
|
vars:
|
||||||
findme:
|
findme:
|
||||||
files:
|
files:
|
||||||
- '{{ ansible_distribution }}-{{ ansible_distribution_major_version }}-{{ ansible_architecture }}.yml'
|
- '{{ ansible_facts["distribution"] }}-{{ ansible_facts["distribution_major_version"] }}-{{ ansible_facts["architecture"] }}.yml'
|
||||||
- '{{ ansible_distribution }}-{{ ansible_distribution_major_version }}-default.yml'
|
- '{{ ansible_facts["distribution"] }}-{{ ansible_facts["distribution_major_version"] }}-default.yml'
|
||||||
- '{{ ansible_distribution }}-default.yml'
|
- '{{ ansible_facts["distribution"] }}-default.yml'
|
||||||
- '{{ ansible_os_family }}-{{ ansible_distribution_major_version }}-{{ ansible_architecture }}.yml'
|
- '{{ ansible_facts["os_family"] }}-{{ ansible_facts["distribution_major_version"] }}-{{ ansible_facts["architecture"] }}.yml'
|
||||||
- '{{ ansible_os_family }}-{{ ansible_distribution_major_version }}-default.yml'
|
- '{{ ansible_facts["os_family"] }}-{{ ansible_facts["distribution_major_version"] }}-default.yml'
|
||||||
- '{{ ansible_os_family }}-default.yml'
|
- '{{ ansible_facts["os_family"] }}-default.yml'
|
||||||
- 'default.yml'
|
- 'default.yml'
|
||||||
errors: 'ignore'
|
errors: 'ignore'
|
||||||
- name: 'include variables'
|
- name: 'include variables'
|
||||||
when:
|
when:
|
||||||
- ansible_system == 'Linux'
|
- ansible_facts["system"] == 'Linux'
|
||||||
include_vars:
|
include_vars:
|
||||||
file: '{{ lookup("first_found", findme ) }}'
|
file: '{{ lookup("first_found", findme ) }}'
|
||||||
name: 'ensure_os_patch'
|
name: 'ensure_os_patch'
|
||||||
vars:
|
vars:
|
||||||
findme:
|
findme:
|
||||||
files:
|
files:
|
||||||
- '{{ ansible_distribution }}-{{ ansible_distribution_major_version }}-{{ ansible_architecture }}.yml'
|
- '{{ ansible_facts["distribution"] }}-{{ ansible_facts["distribution_major_version"] }}-{{ ansible_facts["architecture"] }}.yml'
|
||||||
- '{{ ansible_distribution }}-{{ ansible_distribution_major_version }}-default.yml'
|
- '{{ ansible_facts["distribution"] }}-{{ ansible_facts["distribution_major_version"] }}-default.yml'
|
||||||
- '{{ ansible_distribution }}-default.yml'
|
- '{{ ansible_facts["distribution"] }}-default.yml'
|
||||||
- '{{ ansible_os_family }}-{{ ansible_distribution_major_version }}-{{ ansible_architecture }}.yml'
|
- '{{ ansible_facts["os_family"] }}-{{ ansible_facts["distribution_major_version"] }}-{{ ansible_facts["architecture"] }}.yml'
|
||||||
- '{{ ansible_os_family }}-{{ ansible_distribution_major_version }}-default.yml'
|
- '{{ ansible_facts["os_family"] }}-{{ ansible_facts["distribution_major_version"] }}-default.yml'
|
||||||
- '{{ ansible_os_family }}-default.yml'
|
- '{{ ansible_facts["os_family"] }}-default.yml'
|
||||||
- 'default.yml'
|
- 'default.yml'
|
||||||
paths:
|
paths:
|
||||||
- '../vars/'
|
- '../vars/'
|
||||||
errors: 'ignore'
|
errors: 'ignore'
|
||||||
- name: 'package discovery'
|
- name: 'package discovery'
|
||||||
when:
|
when:
|
||||||
- ansible_system == 'Linux'
|
- ansible_facts["system"] == 'Linux'
|
||||||
- packages is not defined
|
- packages is not defined
|
||||||
ansible.builtin.package_facts:
|
ansible.builtin.package_facts:
|
||||||
- name: 'service discovery'
|
- name: 'service discovery'
|
||||||
when:
|
when:
|
||||||
- ansible_system == 'Linux'
|
- ansible_facts["system"] == 'Linux'
|
||||||
- services is not defined
|
- services is not defined
|
||||||
ansible.builtin.service_facts:
|
ansible.builtin.service_facts:
|
||||||
- name: 'ensure packages'
|
- name: 'ensure packages'
|
||||||
when:
|
when:
|
||||||
- ansible_system == 'Linux'
|
- ansible_facts["system"] == 'Linux'
|
||||||
- ensure_os_patch is defined
|
- ensure_os_patch is defined
|
||||||
- ensure_os_patch.package_list is defined
|
- ensure_os_patch.package_list is defined
|
||||||
- ensure_os_patch.package_list is iterable
|
- ensure_os_patch.package_list is iterable
|
||||||
@@ -62,8 +62,8 @@
|
|||||||
- 'ensure_os_patch.service_facts'
|
- 'ensure_os_patch.service_facts'
|
||||||
- name: 'ensure apt patch'
|
- name: 'ensure apt patch'
|
||||||
when:
|
when:
|
||||||
- ansible_system == 'Linux'
|
- ansible_facts["system"] == 'Linux'
|
||||||
- ansible_pkg_mgr == 'apt'
|
- ansible_facts["pkg_mgr"] == 'apt'
|
||||||
ansible.builtin.apt:
|
ansible.builtin.apt:
|
||||||
autoclean: 'yes'
|
autoclean: 'yes'
|
||||||
autoremove: 'yes'
|
autoremove: 'yes'
|
||||||
@@ -73,8 +73,8 @@
|
|||||||
- 'ensure_os_patch.service_facts'
|
- 'ensure_os_patch.service_facts'
|
||||||
- name: 'ensure dnf or yum patch'
|
- name: 'ensure dnf or yum patch'
|
||||||
when:
|
when:
|
||||||
- ansible_system == 'Linux'
|
- ansible_facts["system"] == 'Linux'
|
||||||
- ansible_pkg_mgr == 'dnf' or ansible_pkg_mgr == 'dnf5' or ansible_pkg_mgr == 'yum'
|
- ansible_facts["pkg_mgr"] == 'dnf' or ansible_facts["pkg_mgr"] == 'dnf5' or ansible_facts["pkg_mgr"] == 'yum'
|
||||||
ansible.builtin.package:
|
ansible.builtin.package:
|
||||||
name: '*'
|
name: '*'
|
||||||
state: 'latest'
|
state: 'latest'
|
||||||
@@ -83,7 +83,7 @@
|
|||||||
- 'ensure_os_patch.service_facts'
|
- 'ensure_os_patch.service_facts'
|
||||||
- name: 'ensure services'
|
- name: 'ensure services'
|
||||||
when:
|
when:
|
||||||
- ansible_system == 'Linux'
|
- ansible_facts["system"] == 'Linux'
|
||||||
- ensure_os_patch is defined
|
- ensure_os_patch is defined
|
||||||
- ensure_os_patch.service_list is defined
|
- ensure_os_patch.service_list is defined
|
||||||
- ensure_os_patch.service_list is iterable
|
- ensure_os_patch.service_list is iterable
|
||||||
|
|||||||
@@ -1,11 +0,0 @@
|
|||||||
---
|
|
||||||
# vars file for ensure_os_patch
|
|
||||||
package_list:
|
|
||||||
- name: 'dnf-automatic'
|
|
||||||
state: 'present'
|
|
||||||
service_list:
|
|
||||||
- name: 'dnf-automatic.timer'
|
|
||||||
state: 'started'
|
|
||||||
enabled: 'yes'
|
|
||||||
...
|
|
||||||
|
|
||||||
@@ -1,11 +0,0 @@
|
|||||||
---
|
|
||||||
# vars file for ensure_os_patch
|
|
||||||
package_list:
|
|
||||||
- name: 'dnf-automatic'
|
|
||||||
state: 'present'
|
|
||||||
service_list:
|
|
||||||
- name: 'dnf-automatic.timer'
|
|
||||||
state: 'started'
|
|
||||||
enabled: 'yes'
|
|
||||||
...
|
|
||||||
|
|
||||||
@@ -1,11 +0,0 @@
|
|||||||
---
|
|
||||||
# vars file for ensure_os_patch
|
|
||||||
package_list:
|
|
||||||
- name: 'dnf-automatic'
|
|
||||||
state: 'present'
|
|
||||||
service_list:
|
|
||||||
- name: 'dnf-automatic.timer'
|
|
||||||
state: 'started'
|
|
||||||
enabled: 'yes'
|
|
||||||
...
|
|
||||||
|
|
||||||
@@ -1,11 +0,0 @@
|
|||||||
---
|
|
||||||
# vars file for ensure_os_patch
|
|
||||||
package_list:
|
|
||||||
- name: 'dnf-automatic'
|
|
||||||
state: 'present'
|
|
||||||
service_list:
|
|
||||||
- name: 'dnf-automatic.timer'
|
|
||||||
state: 'started'
|
|
||||||
enabled: 'yes'
|
|
||||||
...
|
|
||||||
|
|
||||||
@@ -1,11 +0,0 @@
|
|||||||
---
|
|
||||||
# vars file for ensure_os_patch
|
|
||||||
package_list:
|
|
||||||
- name: 'dnf-automatic'
|
|
||||||
state: 'present'
|
|
||||||
service_list:
|
|
||||||
- name: 'dnf-automatic.timer'
|
|
||||||
state: 'started'
|
|
||||||
enabled: 'yes'
|
|
||||||
...
|
|
||||||
|
|
||||||
@@ -1,11 +0,0 @@
|
|||||||
---
|
|
||||||
# vars file for ensure_os_patch
|
|
||||||
package_list:
|
|
||||||
- name: 'dnf-automatic'
|
|
||||||
state: 'present'
|
|
||||||
service_list:
|
|
||||||
- name: 'dnf-automatic.timer'
|
|
||||||
state: 'started'
|
|
||||||
enabled: 'yes'
|
|
||||||
...
|
|
||||||
|
|
||||||
@@ -1,11 +0,0 @@
|
|||||||
---
|
|
||||||
# vars file for ensure_os_patch
|
|
||||||
package_list:
|
|
||||||
- name: 'dnf-automatic'
|
|
||||||
state: 'present'
|
|
||||||
service_list:
|
|
||||||
- name: 'dnf-automatic.timer'
|
|
||||||
state: 'started'
|
|
||||||
enabled: 'yes'
|
|
||||||
...
|
|
||||||
|
|
||||||
@@ -1,11 +0,0 @@
|
|||||||
---
|
|
||||||
# vars file for ensure_os_patch
|
|
||||||
package_list:
|
|
||||||
- name: 'dnf-automatic'
|
|
||||||
state: 'present'
|
|
||||||
service_list:
|
|
||||||
- name: 'dnf-automatic.timer'
|
|
||||||
state: 'started'
|
|
||||||
enabled: 'yes'
|
|
||||||
...
|
|
||||||
|
|
||||||
@@ -1,11 +0,0 @@
|
|||||||
---
|
|
||||||
# vars file for ensure_os_patch
|
|
||||||
package_list:
|
|
||||||
- name: 'dnf-automatic'
|
|
||||||
state: 'present'
|
|
||||||
service_list:
|
|
||||||
- name: 'dnf-automatic.timer'
|
|
||||||
state: 'started'
|
|
||||||
enabled: 'yes'
|
|
||||||
...
|
|
||||||
|
|
||||||
@@ -1,11 +0,0 @@
|
|||||||
---
|
|
||||||
# vars file for ensure_os_patch
|
|
||||||
package_list:
|
|
||||||
- name: 'dnf-automatic'
|
|
||||||
state: 'present'
|
|
||||||
service_list:
|
|
||||||
- name: 'dnf-automatic.timer'
|
|
||||||
state: 'started'
|
|
||||||
enabled: 'yes'
|
|
||||||
...
|
|
||||||
|
|
||||||
@@ -1,11 +0,0 @@
|
|||||||
---
|
|
||||||
# vars file for ensure_os_patch
|
|
||||||
package_list:
|
|
||||||
- name: 'dnf-automatic'
|
|
||||||
state: 'present'
|
|
||||||
service_list:
|
|
||||||
- name: 'dnf-automatic.timer'
|
|
||||||
state: 'started'
|
|
||||||
enabled: 'yes'
|
|
||||||
...
|
|
||||||
|
|
||||||
@@ -1,11 +0,0 @@
|
|||||||
---
|
|
||||||
# vars file for ensure_os_patch
|
|
||||||
package_list:
|
|
||||||
- name: 'dnf-automatic'
|
|
||||||
state: 'present'
|
|
||||||
service_list:
|
|
||||||
- name: 'dnf-automatic.timer'
|
|
||||||
state: 'started'
|
|
||||||
enabled: 'yes'
|
|
||||||
...
|
|
||||||
|
|
||||||
@@ -1,11 +0,0 @@
|
|||||||
---
|
|
||||||
# vars file for ensure_os_patch
|
|
||||||
package_list:
|
|
||||||
- name: 'dnf-automatic'
|
|
||||||
state: 'present'
|
|
||||||
service_list:
|
|
||||||
- name: 'dnf-automatic.timer'
|
|
||||||
state: 'started'
|
|
||||||
enabled: 'yes'
|
|
||||||
...
|
|
||||||
|
|
||||||
@@ -1,11 +0,0 @@
|
|||||||
---
|
|
||||||
# vars file for ensure_os_patch
|
|
||||||
package_list:
|
|
||||||
- name: 'dnf-automatic'
|
|
||||||
state: 'present'
|
|
||||||
service_list:
|
|
||||||
- name: 'dnf-automatic.timer'
|
|
||||||
state: 'started'
|
|
||||||
enabled: 'yes'
|
|
||||||
...
|
|
||||||
|
|
||||||
@@ -1,11 +0,0 @@
|
|||||||
---
|
|
||||||
# vars file for ensure_os_patch
|
|
||||||
package_list:
|
|
||||||
- name: 'dnf-automatic'
|
|
||||||
state: 'present'
|
|
||||||
service_list:
|
|
||||||
- name: 'dnf-automatic.timer'
|
|
||||||
state: 'started'
|
|
||||||
enabled: 'yes'
|
|
||||||
...
|
|
||||||
|
|
||||||
@@ -1,11 +0,0 @@
|
|||||||
---
|
|
||||||
# vars file for ensure_os_patch
|
|
||||||
package_list:
|
|
||||||
- name: 'dnf-automatic'
|
|
||||||
state: 'present'
|
|
||||||
service_list:
|
|
||||||
- name: 'dnf-automatic.timer'
|
|
||||||
state: 'started'
|
|
||||||
enabled: 'yes'
|
|
||||||
...
|
|
||||||
|
|
||||||
@@ -1,11 +0,0 @@
|
|||||||
---
|
|
||||||
# vars file for ensure_os_patch
|
|
||||||
package_list:
|
|
||||||
- name: 'dnf-automatic'
|
|
||||||
state: 'present'
|
|
||||||
service_list:
|
|
||||||
- name: 'dnf-automatic.timer'
|
|
||||||
state: 'started'
|
|
||||||
enabled: 'yes'
|
|
||||||
...
|
|
||||||
|
|
||||||
@@ -1,11 +0,0 @@
|
|||||||
---
|
|
||||||
# vars file for ensure_os_patch
|
|
||||||
package_list:
|
|
||||||
- name: 'dnf-automatic'
|
|
||||||
state: 'present'
|
|
||||||
service_list:
|
|
||||||
- name: 'dnf-automatic.timer'
|
|
||||||
state: 'started'
|
|
||||||
enabled: 'yes'
|
|
||||||
...
|
|
||||||
|
|
||||||
@@ -1,11 +0,0 @@
|
|||||||
---
|
|
||||||
# vars file for ensure_os_patch
|
|
||||||
package_list:
|
|
||||||
- name: 'dnf-automatic'
|
|
||||||
state: 'present'
|
|
||||||
service_list:
|
|
||||||
- name: 'dnf-automatic.timer'
|
|
||||||
state: 'started'
|
|
||||||
enabled: 'yes'
|
|
||||||
...
|
|
||||||
|
|
||||||
@@ -1,11 +0,0 @@
|
|||||||
---
|
|
||||||
# vars file for ensure_os_patch
|
|
||||||
package_list:
|
|
||||||
- name: 'dnf-automatic'
|
|
||||||
state: 'present'
|
|
||||||
service_list:
|
|
||||||
- name: 'dnf-automatic.timer'
|
|
||||||
state: 'started'
|
|
||||||
enabled: 'yes'
|
|
||||||
...
|
|
||||||
|
|
||||||
@@ -1,10 +0,0 @@
|
|||||||
---
|
|
||||||
# vars file for ensure_os_patch
|
|
||||||
package_list:
|
|
||||||
- name: 'dnf5-plugin-automatic'
|
|
||||||
state: 'present'
|
|
||||||
service_list:
|
|
||||||
- name: 'dnf5-automatic.timer'
|
|
||||||
state: 'started'
|
|
||||||
enabled: 'yes'
|
|
||||||
...
|
|
||||||
Reference in New Issue
Block a user