Workaround ansible_selinux fact either being a dict or false

If the python SELinux bindings are not importable by ansible, it returns false as
the ansible_selinux fact.
This commit is contained in:
Mark Goddard 2017-08-07 22:13:06 +00:00
parent 664dcf5d5a
commit f611fa16b2

View File

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