diff --git a/ansible/roles/baremetal/tasks/pre-install.yml b/ansible/roles/baremetal/tasks/pre-install.yml index 2e8f37c84b..7692fddb19 100644 --- a/ansible/roles/baremetal/tasks/pre-install.yml +++ b/ansible/roles/baremetal/tasks/pre-install.yml @@ -1,8 +1,8 @@ --- - +# NOTE: raw install is required to support cloud images which do not have python installed - name: "install python2 and python-simplejson" become: true - raw: "yum install -y python python-simplejson || apt-get install -y python2.7 python-simplejson" + raw: "yum install -y python python-simplejson || (apt-get update && apt-get install -y python2.7 python-simplejson)" - name: gather facts setup: