From 10337f2fcb29059ae7b1718f1693c82bb4c13399 Mon Sep 17 00:00:00 2001 From: Haitian Chen Date: Mon, 6 Feb 2023 01:35:04 -0800 Subject: [PATCH] skip ensuring ntp packages in coreos (#9742) Check OS when ensuring NTP package and tzdata package. --- .../kubernetes/preinstall/tasks/0081-ntp-configurations.yml | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/roles/kubernetes/preinstall/tasks/0081-ntp-configurations.yml b/roles/kubernetes/preinstall/tasks/0081-ntp-configurations.yml index d80d14e5e..b6c6b2e95 100644 --- a/roles/kubernetes/preinstall/tasks/0081-ntp-configurations.yml +++ b/roles/kubernetes/preinstall/tasks/0081-ntp-configurations.yml @@ -4,6 +4,9 @@ name: - "{{ ntp_package }}" state: present + when: + - not is_fedora_coreos + - not ansible_os_family in ["Flatcar", "Flatcar Container Linux by Kinvolk"] - name: Disable systemd-timesyncd service: @@ -71,6 +74,8 @@ state: present when: - ntp_timezone + - not is_fedora_coreos + - not ansible_os_family in ["Flatcar", "Flatcar Container Linux by Kinvolk"] - name: Set timezone timezone: