Replace injected Ansible fact variables in node and control-plane roles (#13240)

This commit is contained in:
Nikhil Kumar
2026-06-02 07:34:51 +05:30
committed by GitHub
parent 8b234bf138
commit 2ffff07887
3 changed files with 9 additions and 9 deletions

View File

@@ -5,6 +5,6 @@ dependencies:
user: "{{ addusers.etcd }}"
when:
- 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: etcd_defaults

View File

@@ -68,7 +68,7 @@
- name: Install kubectl bash completion
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:
- kubectl
ignore_errors: true # noqa ignore-errors
@@ -79,7 +79,7 @@
owner: root
group: root
mode: "0755"
when: ansible_os_family in ["Debian","RedHat", "Suse"]
when: ansible_facts['os_family'] in ["Debian","RedHat", "Suse"]
tags:
- kubectl
- upgrade
@@ -98,7 +98,7 @@
state: present
marker: "# Ansible entries {mark}"
when:
- ansible_os_family in ["Debian","RedHat", "Suse"]
- ansible_facts['os_family'] in ["Debian","RedHat", "Suse"]
- kubectl_alias is defined and kubectl_alias != ""
tags:
- kubectl