mirror of
https://github.com/k3s-io/k3s-ansible.git
synced 2025-12-25 00:12:37 +01:00
Add timezone setting support.
This commit is contained in:
@@ -1,6 +1,11 @@
|
|||||||
---
|
---
|
||||||
k3s_version: v1.17.5+k3s1
|
k3s_version: v1.17.5+k3s1
|
||||||
ansible_user: debian
|
ansible_user: pi
|
||||||
systemd_dir: /etc/systemd/system
|
systemd_dir: /etc/systemd/system
|
||||||
master_ip: "{{ hostvars[groups['master'][0]]['ansible_host'] | default(groups['master'][0]) }}"
|
master_ip: "{{ hostvars[groups['master'][0]]['ansible_host'] | default(groups['master'][0]) }}"
|
||||||
extra_server_args: ""
|
extra_server_args: ""
|
||||||
|
|
||||||
|
# Uncomment (and modify if necessary) the following to set the time zone set for
|
||||||
|
# all members of the cluster.
|
||||||
|
timezone: US/Pacific
|
||||||
|
|
||||||
|
|||||||
4
roles/prereq/handlers/main.yml
Normal file
4
roles/prereq/handlers/main.yml
Normal file
@@ -0,0 +1,4 @@
|
|||||||
|
- name: restart cron
|
||||||
|
service:
|
||||||
|
name: cron
|
||||||
|
state: restarted
|
||||||
@@ -50,3 +50,9 @@
|
|||||||
path: /etc/sudoers
|
path: /etc/sudoers
|
||||||
validate: 'visudo -cf %s'
|
validate: 'visudo -cf %s'
|
||||||
when: ansible_distribution in ['CentOS', 'Red Hat Enterprise Linux']
|
when: ansible_distribution in ['CentOS', 'Red Hat Enterprise Linux']
|
||||||
|
|
||||||
|
- name: "set timezone to {{ timezone }}"
|
||||||
|
timezone:
|
||||||
|
name: "{{ timezone }}"
|
||||||
|
notify: restart cron
|
||||||
|
when: timezone is defined
|
||||||
|
|||||||
Reference in New Issue
Block a user