Ansible core 2.20 fixes and only supported OS releases

Signed-off-by: Jason Rothstein <fdragon@fdragon.org>
This commit is contained in:
2026-05-05 10:44:39 -05:00
parent 49d83a4c6f
commit a842699a00
61 changed files with 14 additions and 990 deletions
+14 -14
View File
@@ -2,36 +2,36 @@
# tasks file for ensure_log_rotation
- name: 'include variables'
when:
- ansible_system == 'Linux'
- ansible_facts["system"] == 'Linux'
include_vars:
file: '{{ lookup("first_found", findme ) }}'
name: 'ensure_log_rotation'
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'
- packages is not defined
- ansible_facts["system"] == 'Linux'
- ansible_facts["packages"] is not defined
ansible.builtin.package_facts:
- name: 'service discovery'
when:
- ansible_system == 'Linux'
- services is not defined
- ansible_facts["system"] == 'Linux'
- ansible_facts["services"] is not defined
ansible.builtin.service_facts:
- name: 'ensure packages'
when:
- ansible_system == 'Linux'
- ansible_facts["system"] == 'Linux'
- ensure_log_rotation is defined
- ensure_log_rotation.package_list is defined
- ensure_log_rotation.package_list is iterable
@@ -46,7 +46,7 @@
- 'ensure_log_rotation.service_facts'
- name: 'ensure configuration'
when:
- ansible_system == 'Linux'
- ansible_facts["system"] == 'Linux'
- ensure_log_rotation is defined
- ensure_log_rotation.template_list is defined
- ensure_log_rotation.template_list is iterable
@@ -75,7 +75,7 @@
- 'ensure_log_rotation.service_restart'
- name: 'ensure services'
when:
- ansible_system == 'Linux'
- ansible_facts["system"] == 'Linux'
- ensure_log_rotation is defined
- ensure_log_rotation.service_list is defined
- ensure_log_rotation.service_list is iterable