diff --git a/playbooks/openstack-hosts-setup.yml b/playbooks/openstack-hosts-setup.yml index ef21b28418..23201daafb 100644 --- a/playbooks/openstack-hosts-setup.yml +++ b/playbooks/openstack-hosts-setup.yml @@ -36,7 +36,7 @@ exit $result; ;; ubuntu) - dpkg -l python + dpkg-query -s python $> /dev/null result=$? if [ $result -eq 1 ]; then @@ -48,6 +48,7 @@ ;; esac changed_when: "result.rc == 2" + failed_when: "{{ result.rc not in [0, 2] }}" - name: Basic host setup hosts: "{{ openstack_host_group|default('hosts') }}"