---
- hosts: all
  gather_facts: no
  become: true
  pre_tasks:
    - name: Configure apt-cacher-ng
      raw: "echo 'Acquire::http::Proxy \"{{ host_preparation_apt_cacher_ng }}\";' >
          /etc/apt/apt.conf.d/11proxy"
      when: host_preparation_apt_cacher_ng is defined
    - name: Install Python first
      raw: python --version || python3 --version || (apt update && apt install -y --no-install-recommends python)
  roles:
    - opsta.host_preparation
  environment: "{{ proxy_env | default({}) }}"

# Run to setup NTP Server/Client with gathering facts
- hosts: all
  gather_facts: yes
  become: true
  roles:
    - opsta.ntp
  environment: "{{ proxy_env | default({}) }}"

---
- hosts: all
  gather_facts: no
  become: true
  pre_tasks:
    - name: Configure apt-cacher-ng
      raw: "echo 'Acquire::http::Proxy \"{{ host_preparation_apt_cacher_ng }}\";' >
          /etc/apt/apt.conf.d/11proxy"
      when: host_preparation_apt_cacher_ng is defined
    - name: Install Python first
      raw: python --version || python3 --version || (apt update && apt install -y --no-install-recommends python3)
  roles:
    - opsta.host_preparation
  environment: "{{ proxy_env | default({}) }}"

# Run to setup NTP Server/Client with gathering facts
- hosts: all
  gather_facts: yes
  become: true
  roles:
    - opsta.ntp
  environment: "{{ proxy_env | default({}) }}"

Change python 2 to 3 for preparation host
Change python 2 to 3 for preparation host
