diff --git a/roles/kubernetes/control-plane/meta/main.yml b/roles/kubernetes/control-plane/meta/main.yml index 2657006e020..9d92e012935 100644 --- a/roles/kubernetes/control-plane/meta/main.yml +++ b/roles/kubernetes/control-plane/meta/main.yml @@ -8,4 +8,4 @@ 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) diff --git a/roles/kubernetes/preinstall/defaults/main.yml b/roles/kubernetes/preinstall/defaults/main.yml index 501d9ee00e8..6162f1a4e0a 100644 --- a/roles/kubernetes/preinstall/defaults/main.yml +++ b/roles/kubernetes/preinstall/defaults/main.yml @@ -70,7 +70,7 @@ ntp_enabled: false # The default is ntp for most platforms, or chrony on RHEL/CentOS 7 and later. # The ntp_package can be one of ['ntp','chrony'] ntp_package: >- - {% if ansible_os_family == "RedHat" -%} + {% if ansible_facts.os_family == "RedHat" -%} chrony {%- else -%} ntp diff --git a/roles/kubernetes/preinstall/tasks/0081-ntp-configurations.yml b/roles/kubernetes/preinstall/tasks/0081-ntp-configurations.yml index ba4578744be..6c6231843a5 100644 --- a/roles/kubernetes/preinstall/tasks/0081-ntp-configurations.yml +++ b/roles/kubernetes/preinstall/tasks/0081-ntp-configurations.yml @@ -17,7 +17,7 @@ ntp_config_file: >- {% if ntp_package == "ntp" -%} /etc/ntp.conf - {%- elif ansible_os_family in ['RedHat', 'Suse'] -%} + {%- elif ansible_facts.os_family in ['RedHat', 'Suse'] -%} /etc/chrony.conf {%- else -%} /etc/chrony/chrony.conf @@ -25,7 +25,7 @@ ntp_service_name: >- {% if ntp_package == "chrony" -%} chronyd - {%- elif ansible_os_family == 'RedHat' -%} + {%- elif ansible_facts.os_family == 'RedHat' -%} ntpd {%- else -%} ntp