Add timezone.yml
This commit is contained in:
parent
3b9f81d59b
commit
9f4118cadc
1 changed files with 19 additions and 0 deletions
19
timezone.yml
Normal file
19
timezone.yml
Normal file
|
@ -0,0 +1,19 @@
|
||||||
|
- name: Set timezone and configure timesyncd
|
||||||
|
hosts: "*"
|
||||||
|
become: yes
|
||||||
|
tasks:
|
||||||
|
- name: set timezone
|
||||||
|
shell: timedatectl set-timezone America/New_York
|
||||||
|
|
||||||
|
- name: Make sure timesyncd is stopped
|
||||||
|
systemd:
|
||||||
|
name: systemd-timesyncd.service
|
||||||
|
state: stopped
|
||||||
|
|
||||||
|
- name: Copy over the timesyncd config
|
||||||
|
template: src=../templates/timesyncd.conf dest=/etc/systemd/timesyncd.conf
|
||||||
|
|
||||||
|
- name: Make sure timesyncd is started
|
||||||
|
systemd:
|
||||||
|
name: systemd-timesyncd.service
|
||||||
|
state: started
|
Reference in a new issue