mirror of
https://github.com/kubernetes-sigs/kubespray.git
synced 2026-06-04 22:46:20 -02:30
Replace injected Ansible fact variables in node and control-plane roles (#13240)
This commit is contained in:
@@ -5,6 +5,6 @@ dependencies:
|
|||||||
user: "{{ addusers.etcd }}"
|
user: "{{ addusers.etcd }}"
|
||||||
when:
|
when:
|
||||||
- etcd_deployment_type == "kubeadm"
|
- etcd_deployment_type == "kubeadm"
|
||||||
- not (ansible_os_family in ["Flatcar", "Flatcar Container Linux by Kinvolk", "ClearLinux"] or is_fedora_coreos)
|
- not (ansible_facts['os_family'] in ["Flatcar", "Flatcar Container Linux by Kinvolk", "ClearLinux"] or is_fedora_coreos)
|
||||||
- role: network_plugin/calico_defaults
|
- role: network_plugin/calico_defaults
|
||||||
- role: etcd_defaults
|
- role: etcd_defaults
|
||||||
|
|||||||
@@ -68,7 +68,7 @@
|
|||||||
|
|
||||||
- name: Install kubectl bash completion
|
- name: Install kubectl bash completion
|
||||||
shell: "{{ bin_dir }}/kubectl completion bash >/etc/bash_completion.d/kubectl.sh"
|
shell: "{{ bin_dir }}/kubectl completion bash >/etc/bash_completion.d/kubectl.sh"
|
||||||
when: ansible_os_family in ["Debian","RedHat", "Suse"]
|
when: ansible_facts['os_family'] in ["Debian","RedHat", "Suse"]
|
||||||
tags:
|
tags:
|
||||||
- kubectl
|
- kubectl
|
||||||
ignore_errors: true # noqa ignore-errors
|
ignore_errors: true # noqa ignore-errors
|
||||||
@@ -79,7 +79,7 @@
|
|||||||
owner: root
|
owner: root
|
||||||
group: root
|
group: root
|
||||||
mode: "0755"
|
mode: "0755"
|
||||||
when: ansible_os_family in ["Debian","RedHat", "Suse"]
|
when: ansible_facts['os_family'] in ["Debian","RedHat", "Suse"]
|
||||||
tags:
|
tags:
|
||||||
- kubectl
|
- kubectl
|
||||||
- upgrade
|
- upgrade
|
||||||
@@ -98,7 +98,7 @@
|
|||||||
state: present
|
state: present
|
||||||
marker: "# Ansible entries {mark}"
|
marker: "# Ansible entries {mark}"
|
||||||
when:
|
when:
|
||||||
- ansible_os_family in ["Debian","RedHat", "Suse"]
|
- ansible_facts['os_family'] in ["Debian","RedHat", "Suse"]
|
||||||
- kubectl_alias is defined and kubectl_alias != ""
|
- kubectl_alias is defined and kubectl_alias != ""
|
||||||
tags:
|
tags:
|
||||||
- kubectl
|
- kubectl
|
||||||
|
|||||||
@@ -54,9 +54,9 @@
|
|||||||
include_vars: "{{ item }}"
|
include_vars: "{{ item }}"
|
||||||
with_first_found:
|
with_first_found:
|
||||||
- files:
|
- files:
|
||||||
- "{{ ansible_distribution | lower }}-{{ ansible_distribution_version | lower | replace('/', '_') }}.yml"
|
- "{{ ansible_facts['distribution'] | lower }}-{{ ansible_facts['distribution_version'] | lower | replace('/', '_') }}.yml"
|
||||||
- "{{ ansible_distribution | lower }}-{{ ansible_distribution_release }}.yml"
|
- "{{ ansible_facts['distribution'] | lower }}-{{ ansible_facts['distribution_release'] }}.yml"
|
||||||
- "{{ ansible_distribution | lower }}-{{ ansible_distribution_major_version | lower | replace('/', '_') }}.yml"
|
- "{{ ansible_facts['distribution'] | lower }}-{{ ansible_facts['distribution_major_version'] | lower | replace('/', '_') }}.yml"
|
||||||
- "{{ ansible_distribution | lower }}.yml"
|
- "{{ ansible_facts['distribution'] | lower }}.yml"
|
||||||
- "{{ ansible_os_family | lower }}.yml"
|
- "{{ ansible_facts['os_family'] | lower }}.yml"
|
||||||
skip: true
|
skip: true
|
||||||
|
|||||||
Reference in New Issue
Block a user