Fix check for SELinux status in kolla-ansible role

When SELinux python module is not installed on the host (in this
instance the control host), ansible sets the ansible_selinux fact to
False. Also, the item to check is status rather than mode.
This commit is contained in:
Mark Goddard 2017-09-07 19:41:21 +01:00
parent 8d544221bb
commit 7b50904441

View File

@ -76,4 +76,6 @@
src: "/usr/lib64/python2.7/site-packages/selinux"
dest: "{{ kolla_venv }}/lib/python2.7/site-packages/selinux"
state: link
when: "{{ ansible_selinux.mode|default != 'disabled' }}"
when:
- ansible_selinux != False
- ansible_selinux.status != 'disabled'