# Bootstrap fresh instances with no python installed so we avoid the
# chicken-and-egg problem (ansible can't find a python interpreter)
# Disable facts gathering and use raw module to install python
- hosts: all:!provisioner
  gather_facts: false
  tasks:
    - name: Run dnf update and install python3
      raw: "{{ item }}"
      loop:
        - sudo dnf -y update
        - sudo dnf -y install python3
      changed_when: true

# Bootstrap fresh instances with no python installed so we avoid the
# chicken-and-egg problem (ansible can't find a python interpreter)
# Disable facts gathering and use raw module to install python
- hosts: all:!provisioner
  gather_facts: false
  tasks:
    - name: Run dnf update and install python3
      raw: "{{ item }}"
      loop:
        - sudo $(command -v dnf || command -v yum) -y update
        - sudo $(command -v dnf || command -v yum) -y install python3
      changed_when: true

Fix issues with c7 hosts which don't have dnf
Fix issues with c7 hosts which don't have dnf

Change-Id: I52b42d2481f3536c7e3dcc9f2596916b6a3eeb15
