mirror of
https://github.com/kubernetes-sigs/kubespray.git
synced 2026-10-31 22:46:19 -02:30
fix/ansible-core 2.19: ntp_timezone implicit string -> bool (#13469)
This commit is contained in:
@@ -64,13 +64,15 @@
|
|||||||
state: started
|
state: started
|
||||||
enabled: true
|
enabled: true
|
||||||
|
|
||||||
|
- name: Configure NTP timezone
|
||||||
|
when: ntp_timezone != ""
|
||||||
|
block:
|
||||||
- name: Ensure tzdata package
|
- name: Ensure tzdata package
|
||||||
package:
|
package:
|
||||||
name:
|
name:
|
||||||
- tzdata
|
- tzdata
|
||||||
state: present
|
state: present
|
||||||
when:
|
when:
|
||||||
- ntp_timezone
|
|
||||||
- not is_fedora_coreos
|
- not is_fedora_coreos
|
||||||
- ansible_facts['os_family'] not in ["Flatcar", "Flatcar Container Linux by Kinvolk"]
|
- ansible_facts['os_family'] not in ["Flatcar", "Flatcar Container Linux by Kinvolk"]
|
||||||
|
|
||||||
@@ -78,7 +80,6 @@
|
|||||||
ansible.builtin.setup:
|
ansible.builtin.setup:
|
||||||
gather_subset: selinux
|
gather_subset: selinux
|
||||||
when:
|
when:
|
||||||
- ntp_timezone
|
|
||||||
- ansible_facts['os_family'] == "RedHat"
|
- ansible_facts['os_family'] == "RedHat"
|
||||||
|
|
||||||
- name: Put SELinux in permissive mode, logging actions that would be blocked.
|
- name: Put SELinux in permissive mode, logging actions that would be blocked.
|
||||||
@@ -86,7 +87,6 @@
|
|||||||
policy: targeted
|
policy: targeted
|
||||||
state: permissive
|
state: permissive
|
||||||
when:
|
when:
|
||||||
- ntp_timezone
|
|
||||||
- ansible_facts['os_family'] == "RedHat"
|
- ansible_facts['os_family'] == "RedHat"
|
||||||
- ansible_facts.selinux.status == 'enabled'
|
- ansible_facts.selinux.status == 'enabled'
|
||||||
- ansible_facts.selinux.mode == 'enforcing'
|
- ansible_facts.selinux.mode == 'enforcing'
|
||||||
@@ -94,14 +94,11 @@
|
|||||||
- name: Set ntp_timezone
|
- name: Set ntp_timezone
|
||||||
community.general.timezone:
|
community.general.timezone:
|
||||||
name: "{{ ntp_timezone }}"
|
name: "{{ ntp_timezone }}"
|
||||||
when:
|
|
||||||
- ntp_timezone
|
|
||||||
|
|
||||||
- name: Re-enable SELinux
|
- name: Re-enable SELinux
|
||||||
ansible.posix.selinux:
|
ansible.posix.selinux:
|
||||||
policy: targeted
|
policy: targeted
|
||||||
state: "{{ preinstall_selinux_state }}"
|
state: "{{ preinstall_selinux_state }}"
|
||||||
when:
|
when:
|
||||||
- ntp_timezone
|
|
||||||
- ansible_facts['os_family'] == "RedHat"
|
- ansible_facts['os_family'] == "RedHat"
|
||||||
- ansible_facts.selinux.status == 'enabled'
|
- ansible_facts.selinux.status == 'enabled'
|
||||||
|
|||||||
Reference in New Issue
Block a user