kubespray/roles/kubernetes/preinstall/tasks/main.yml

39 lines
878 B
YAML
Raw Normal View History

---
- name: "Identify init system"
shell: >
if $(pgrep systemd > /dev/null); then
echo systemd;
2015-12-31 21:07:02 +08:00
else
echo sysvinit;
fi
always_run: True
register: init_system_output
- set_fact:
init_system: "{{ init_system_output.stdout }}"
2015-12-31 21:07:02 +08:00
- name: Install packages requirements
action:
module: "{{ ansible_pkg_mgr }}"
name: "{{ item }}"
state: latest
with_items: common_required_pkgs
- name: Install debian packages requirements
apt:
name: "{{ item }}"
state: latest
when: ansible_os_family == "Debian"
2015-12-31 21:07:02 +08:00
with_items: debian_required_pkgs
- name: Install redhat packages requirements
action:
module: "{{ ansible_pkg_mgr }}"
name: "{{ item }}"
state: latest
when: ansible_os_family == "RedHat"
with_items: rh_required_pkgs
- include: python-bootstrap.yml
when: ansible_os_family not in [ "Debian", "RedHat" ]