mirror of
https://github.com/kubernetes-sigs/kubespray.git
synced 2026-02-28 09:39:12 +03:00
Flannel running as pod
This commit is contained in:
@@ -3,13 +3,7 @@ common_required_pkgs:
|
||||
- python-httplib2
|
||||
- openssl
|
||||
- curl
|
||||
|
||||
debian_required_pkgs:
|
||||
- python-apt
|
||||
- python-pip
|
||||
|
||||
rh_required_pkgs:
|
||||
- libselinux-python
|
||||
- rsync
|
||||
|
||||
pypy_version: 2.4.0
|
||||
python_pypy_url: "https://bitbucket.org/pypy/pypy/downloads/pypy-{{ pypy_version }}.tar.bz2"
|
||||
|
||||
@@ -1,4 +1,17 @@
|
||||
---
|
||||
- name: gather os specific variables
|
||||
include_vars: "{{ item }}"
|
||||
with_first_found:
|
||||
- files:
|
||||
- "{{ ansible_distribution|lower }}-{{ ansible_distribution_version|lower|replace('/', '_') }}.yml"
|
||||
- "{{ ansible_distribution|lower }}-{{ ansible_distribution_release }}.yml"
|
||||
- "{{ ansible_distribution|lower }}-{{ ansible_distribution_major_version|lower|replace('/', '_') }}.yml"
|
||||
- "{{ ansible_distribution|lower }}.yml"
|
||||
- "{{ ansible_os_family|lower }}.yml"
|
||||
- defaults.yml
|
||||
paths:
|
||||
- ../vars
|
||||
|
||||
- name: "Identify init system"
|
||||
shell: >
|
||||
$(pgrep systemd > /dev/null && systemctl status > /dev/null);
|
||||
@@ -14,27 +27,29 @@
|
||||
- set_fact:
|
||||
init_system: "{{ init_system_output.stdout }}"
|
||||
|
||||
- name: Install python-apt for Debian distribs
|
||||
shell: apt-get install -y python-apt
|
||||
when: ansible_os_family == "Debian"
|
||||
changed_when: False
|
||||
|
||||
- name: Install python-dnf for latest RedHat versions
|
||||
shell: dnf install -y python-dnf yum
|
||||
when: ansible_distribution == "Fedora" and
|
||||
ansible_distribution_major_version > 21
|
||||
changed_when: False
|
||||
|
||||
- name: Install packages requirements
|
||||
action:
|
||||
module: "{{ ansible_pkg_mgr }}"
|
||||
name: "{{ item }}"
|
||||
state: latest
|
||||
with_items: common_required_pkgs
|
||||
with_items: "{{required_pkgs | union(common_required_pkgs)}}"
|
||||
|
||||
- name: Install debian packages requirements
|
||||
apt:
|
||||
name: "{{ item }}"
|
||||
state: latest
|
||||
when: ansible_os_family == "Debian"
|
||||
with_items: debian_required_pkgs
|
||||
|
||||
- name: Install redhat packages requirements
|
||||
action:
|
||||
module: "{{ ansible_pkg_mgr }}"
|
||||
name: "{{ item }}"
|
||||
state: latest
|
||||
# Todo : selinux configuration
|
||||
- name: Set selinux policy to permissive
|
||||
selinux: policy=targeted state=permissive
|
||||
when: ansible_os_family == "RedHat"
|
||||
with_items: rh_required_pkgs
|
||||
changed_when: False
|
||||
|
||||
- include: python-bootstrap.yml
|
||||
when: ansible_os_family not in [ "Debian", "RedHat" ]
|
||||
|
||||
4
roles/kubernetes/preinstall/vars/centos.yml
Normal file
4
roles/kubernetes/preinstall/vars/centos.yml
Normal file
@@ -0,0 +1,4 @@
|
||||
required_pkgs:
|
||||
- epel-release
|
||||
- libselinux-python
|
||||
- device-mapper-libs
|
||||
4
roles/kubernetes/preinstall/vars/debian.yml
Normal file
4
roles/kubernetes/preinstall/vars/debian.yml
Normal file
@@ -0,0 +1,4 @@
|
||||
required_pkgs:
|
||||
- python-apt
|
||||
- apt-transport-https
|
||||
- software-properties-common
|
||||
3
roles/kubernetes/preinstall/vars/fedora.yml
Normal file
3
roles/kubernetes/preinstall/vars/fedora.yml
Normal file
@@ -0,0 +1,3 @@
|
||||
required_pkgs:
|
||||
- libselinux-python
|
||||
- device-mapper-libs
|
||||
3
roles/kubernetes/preinstall/vars/redhat.yml
Normal file
3
roles/kubernetes/preinstall/vars/redhat.yml
Normal file
@@ -0,0 +1,3 @@
|
||||
required_pkgs:
|
||||
- libselinux-python
|
||||
- device-mapper-libs
|
||||
Reference in New Issue
Block a user