diff --git a/tasks/main.yml b/tasks/main.yml index 98d63bb..b490cfb 100644 --- a/tasks/main.yml +++ b/tasks/main.yml @@ -2,7 +2,7 @@ # tasks file for ensure_git - name: 'include variables' when: - - ansible_system == 'Linux' + - ansible_facts["system"] == 'Linux' include_vars: file: '{{ lookup("first_found", findme ) }}' name: 'ensure_git' @@ -21,17 +21,17 @@ errors: 'ignore' - name: 'package discovery' when: - - ansible_system == 'Linux' + - 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' - ansible_facts["services"] is not defined ansible.builtin.service_facts: - name: 'ensure packages' when: - - ansible_system == 'Linux' + - ansible_facts["system"] == 'Linux' - ensure_git is defined - ensure_git.package_list is defined - ensure_git.package_list is iterable @@ -46,7 +46,7 @@ - 'ensure_git.service_facts' - name: 'ensure configurations' when: - - ansible_system == 'Linux' + - ansible_facts["system"] == 'Linux' - ensure_git is defined - ensure_git.template_list is defined - ensure_git.template_list is iterable @@ -71,7 +71,7 @@ - 'ensure_git.service_restart' - name: 'ensure services' when: - - ansible_system == 'Linux' + - ansible_facts["system"] == 'Linux' - ensure_git is defined - ensure_git.service_list is defined - ensure_git.service_list is iterable @@ -87,7 +87,7 @@ - 'ensure_git.service_facts' - name: 'Ensure SELinux is configured' when: - - ansible_system == 'Linux' + - ansible_facts["system"] == 'Linux' - ensure_git is defined - ensure_git.selinux_policy is defined - ensure_git.selinux_state is defined @@ -102,7 +102,7 @@ - 'ensure_git.service_restart' - name: 'Reboot if required' when: - - ansible_system == 'Linux' + - ansible_facts["system"] == 'Linux' - ensure_git is defined - ensure_git.selinux_policy is defined - ensure_git.selinux_state is defined @@ -112,7 +112,7 @@ reboot: - name: 'ensure seboolean' when: - - ansible_system == 'Linux' + - ansible_facts["system"] == 'Linux' - ensure_git is defined - ensure_git.seboolean_list is defined - ensure_git.seboolean_list is iterable