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