You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

35 lines
971 B

  1. ---
  2. # Some Fedora based distros ship without Python installed
  3. - name: Check if bootstrap is needed
  4. raw: which python
  5. register: need_bootstrap
  6. failed_when: false
  7. changed_when: false
  8. tags:
  9. - facts
  10. - name: Add proxy to dnf.conf if http_proxy is defined
  11. ini_file:
  12. path: "/etc/dnf/dnf.conf"
  13. section: main
  14. option: proxy
  15. value: "{{ http_proxy | default(omit) }}"
  16. state: "{{ http_proxy | default(False) | ternary('present', 'absent') }}"
  17. no_extra_spaces: true
  18. become: true
  19. when: not skip_http_proxy_on_os_packages
  20. - name: Install python3 on fedora
  21. raw: "dnf install --assumeyes --quiet python3"
  22. become: true
  23. when:
  24. - need_bootstrap.rc != 0
  25. # libselinux-python3 is required on SELinux enabled hosts
  26. # See https://docs.ansible.com/ansible/latest/installation_guide/intro_installation.html#managed-node-requirements
  27. - name: Install libselinux-python3
  28. package:
  29. name: libselinux-python3
  30. state: present
  31. become: true