2017-09-27 21:47:47 +08:00
|
|
|
---
|
2017-09-20 00:47:43 +08:00
|
|
|
- name: look up docker cgroup driver
|
|
|
|
shell: "docker info | grep 'Cgroup Driver' | awk -F': ' '{ print $2; }'"
|
|
|
|
register: docker_cgroup_driver_result
|
2017-10-26 04:19:40 +08:00
|
|
|
changed_when: false
|
2020-02-07 18:19:43 +08:00
|
|
|
when: container_manager in ['crio', 'docker']
|
2017-09-20 00:47:43 +08:00
|
|
|
|
2019-06-30 05:09:20 +08:00
|
|
|
- name: set standalone_kubelet fact
|
2019-05-16 15:27:43 +08:00
|
|
|
set_fact:
|
2017-09-20 00:47:43 +08:00
|
|
|
standalone_kubelet: >-
|
|
|
|
{%- if inventory_hostname in groups['kube-master'] and inventory_hostname not in groups['kube-node'] -%}true{%- else -%}false{%- endif -%}
|
2019-06-30 05:09:20 +08:00
|
|
|
|
|
|
|
- name: set kubelet_cgroup_driver_detected fact for containerd
|
|
|
|
set_fact:
|
|
|
|
kubelet_cgroup_driver_detected: >-
|
|
|
|
{%- if containerd_use_systemd_cgroup -%}systemd{%- else -%}cgroupfs{%- endif -%}
|
|
|
|
when: container_manager == 'containerd'
|
|
|
|
|
|
|
|
- name: set kubelet_cgroup_driver_detected fact for other engines
|
|
|
|
set_fact:
|
2017-09-20 00:47:43 +08:00
|
|
|
kubelet_cgroup_driver_detected: "{{ docker_cgroup_driver_result.stdout }}"
|
2020-02-07 18:19:43 +08:00
|
|
|
when: container_manager in ['crio', 'docker']
|
2018-09-17 15:00:55 +08:00
|
|
|
|
|
|
|
- name: os specific vars
|
|
|
|
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"
|
|
|
|
skip: true
|