From 8d8b193c53f9a3ff539f07d461c80916fadc334d Mon Sep 17 00:00:00 2001 From: Jason Rothstein Date: Tue, 5 May 2026 15:01:05 -0500 Subject: [PATCH] More ansible core 2.20 fixes Signed-off-by: Jason Rothstein --- tasks/main.yml | 26 +++++++++++++------------- 1 file changed, 13 insertions(+), 13 deletions(-) diff --git a/tasks/main.yml b/tasks/main.yml index 60068e0..0127cf2 100644 --- a/tasks/main.yml +++ b/tasks/main.yml @@ -2,7 +2,7 @@ # tasks file for ensure_apache - name: 'include variables' when: - - ansible_system == 'Linux' + - ansible_facts["system"] == 'Linux' include_vars: file: '{{ lookup("first_found", findme ) }}' name: 'ensure_apache' @@ -21,17 +21,17 @@ 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' + - ansible_facts["system"] == 'Linux' - services is not defined ansible.builtin.service_facts: - name: 'ensure sysctl' when: - - ansible_system == 'Linux' + - ansible_facts["system"] == 'Linux' - ensure_apache is defined - ensure_apache.sysctl_list is defined - ensure_apache.sysctl_list is iterable @@ -52,7 +52,7 @@ - 'ensure_apache.service_restart' - name: 'ensure packages' when: - - ansible_system == 'Linux' + - ansible_facts["system"] == 'Linux' - ensure_apache is defined - ensure_apache.package_list is defined - ensure_apache.package_list is iterable @@ -69,7 +69,7 @@ - 'ensure_apache.service_restart' - name: 'ensure seboolean' when: - - ansible_system == 'Linux' + - ansible_facts["system"] == 'Linux' - ensure_apache is defined - ensure_apache.seboolean_list is defined - ensure_apache.seboolean_list is iterable @@ -87,7 +87,7 @@ - 'ensure_apache.service_restart' - name: 'ensure configurations' when: - - ansible_system == 'Linux' + - ansible_facts["system"] == 'Linux' - http_vhost is defined - ensure_apache is defined - ensure_apache.template_list is defined @@ -113,7 +113,7 @@ - 'ensure_apache.service_restart' - name: 'ensure firewall' when: - - ansible_system == 'Linux' + - ansible_facts["system"] == 'Linux' - packages["firewalld"] is defined - packages["python3-firewall"] is defined - ensure_apache is defined @@ -133,7 +133,7 @@ - 'ensure_apache.service_restart' - name: 'ensure permissions' when: - - ansible_system == 'Linux' + - ansible_facts["system"] == 'Linux' - ensure_apache is defined - http_vhost is defined - http_vhost is iterable @@ -164,7 +164,7 @@ - 'ensure_apache.service_restart' - name: 'ensure vhost document roots' when: - - ansible_system == 'Linux' + - ansible_facts["system"] == 'Linux' - ensure_apache is defined - http_vhost is defined - http_vhost is iterable @@ -183,7 +183,7 @@ - 'ensure_apache.service_restart' - name: 'ensure website content from git repos' when: - - ansible_system == 'Linux' + - ansible_facts["system"] == 'Linux' - ensure_apache is defined - http_vhost is defined - http_vhost is iterable @@ -203,7 +203,7 @@ - 'ensure_apache.service_restart' - name: 'ensure services' when: - - ansible_system == 'Linux' + - ansible_facts["system"] == 'Linux' - ensure_apache is defined - ensure_apache.service_list is defined - ensure_apache.service_list is iterable