diff --git a/playbooks/openstack-hosts-setup.yml b/playbooks/openstack-hosts-setup.yml index d5bf4645d3..3f3134cc7f 100644 --- a/playbooks/openstack-hosts-setup.yml +++ b/playbooks/openstack-hosts-setup.yml @@ -24,15 +24,12 @@ gather_facts: false user: root pre_tasks: - - name: Install prerequisites before setting up the host + - name: Ensure python is installed register: result raw: | - if which apt-get > /dev/null && ! which python > /dev/null ; then + if which apt-get >/dev/null && ! which python >/dev/null ; then apt-get -y install python exit 2 - elif which yum > /dev/null && ! which dnf > /dev/null ; then - yum --disablerepo=extras -y install dnf dnf-plugins-core python-dnf - exit 2 else exit 0 fi