Not sure if it was an Ansible or Ruby update that changed this, but
conditionals of the form `x in [1, 2]` fail with errors related to
template parsing. Changed the conditionals to logically equivalent ones
that use simple equality and conjunction.
Fixes #23
Change-Id: I4f76cc32fb6cd34253cd0b6374a933097ae04985
Signed-off-by: Daniel Farrell <dfarrell@redhat.com>
---
- name: Check if in a container
command: grep -q docker /proc/1/cgroup
- failed_when: in_container.rc not in [0, 1]
+ failed_when: in_container.rc != 0 and in_container.rc !=1
changed_when: false
register: in_container
- name: Check if FirewallD service is running
command: systemctl is-active firewalld
- failed_when: firewalld_status.stdout not in ['unknown', 'active']
+ failed_when: firewalld_status.stdout != 'unknown' and firewalld_status.stdout != 'active'
changed_when: false
register: firewalld_status
when: in_container.rc == 1