c12s-kubespray/roles/bootstrap-os/tasks/bootstrap-fedora.yml

38 lines
1,007 B
YAML
Raw Normal View History

2018-09-19 17:57:20 +00:00
---
# Some Fedora based distros ship without Python installed
- name: Check if bootstrap is needed
raw: which python
2018-09-19 17:57:20 +00:00
register: need_bootstrap
failed_when: false
changed_when: false
environment: {}
tags:
- facts
2018-09-19 17:57:20 +00:00
- name: Add proxy to dnf.conf if http_proxy is defined
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
become: true
when: not skip_http_proxy_on_os_packages
- name: Install python3 on fedora
raw: "dnf install --assumeyes --quiet python3"
become: true
environment: {}
when:
- need_bootstrap.rc != 0
2018-09-19 17:57:20 +00:00
# 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
package:
name: libselinux-python3
2018-09-19 17:57:20 +00:00
state: present
become: true