Check whether ansible_selinux is defined
This commit is contained in:
parent
ccb2d871b9
commit
f88f793cab
@ -19,7 +19,7 @@
|
||||
name: "{{ item }}"
|
||||
state: present
|
||||
with_items: "{{ samba_selinux_packages }}"
|
||||
when: ansible_selinux.status == 'enabled'
|
||||
when: ansible_selinux is defined and ansible_selinux.status == 'enabled'
|
||||
tags: samba
|
||||
|
||||
- name: Make sure SELinux boolean settings are correct
|
||||
@ -28,7 +28,7 @@
|
||||
state: yes
|
||||
persistent: yes
|
||||
with_items: "{{ samba_selinux_booleans }}"
|
||||
when: ansible_selinux.status == 'enabled'
|
||||
when: ansible_selinux is defined and ansible_selinux.status == 'enabled'
|
||||
tags: samba
|
||||
|
||||
- name: Create Samba shares root directory
|
||||
|
Loading…
Reference in New Issue
Block a user