Skip to content
fedora.yml 1004 B
Newer Older
Giacomo Longo's avatar
Giacomo Longo committed
---
# Some Fedora based distros ship without Python installed

- name: Check if bootstrap is needed
Giacomo Longo's avatar
Giacomo Longo committed
  register: need_bootstrap
  failed_when: false
  changed_when: false
Giacomo Longo's avatar
Giacomo Longo committed

- name: Add proxy to dnf.conf if http_proxy is defined
  community.general.ini_file:
    path: "/etc/dnf/dnf.conf"
    section: main
    option: proxy
    value: "{{ http_proxy | default(omit) }}"
    state: "{{ http_proxy | default(False) | ternary('present', 'absent') }}"
    no_extra_spaces: true
    mode: 0644
  when: not skip_http_proxy_on_os_packages
- name: Install python3 on fedora
  raw: "dnf install --assumeyes --quiet python3"
  become: true
  when:
    - need_bootstrap.rc != 0
Giacomo Longo's avatar
Giacomo Longo committed

# libselinux-python3 is required on SELinux enabled hosts
# See https://docs.ansible.com/ansible/latest/installation_guide/intro_installation.html#managed-node-requirements
- name: Install libselinux-python3
Giacomo Longo's avatar
Giacomo Longo committed
    state: present
  become: true