Skip to content

Commit d49a86f

Browse files
committed
fix: move timesyncd tasks to main
Signed-off-by: Kevin Carter <[email protected]>
1 parent f28a428 commit d49a86f

File tree

3 files changed

+16
-16
lines changed

3 files changed

+16
-16
lines changed

ansible/roles/host_setup/handlers/main.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,6 @@
4141

4242
- name: Reload systemd-timesyncd
4343
ansible.builtin.systemd:
44-
name: systemd-timesyncd
45-
state: reloaded
44+
name: systemd-timesyncd.service
45+
state: restarted
4646
enabled: true

ansible/roles/host_setup/tasks/configure_hosts.yml

Lines changed: 0 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -78,17 +78,3 @@
7878
dest: /etc/systemd/system/queue_max.service
7979
mode: "0644"
8080
notify: Load and start queue_max service
81-
82-
- name: Ensure timesyncd is running
83-
ansible.builtin.service:
84-
name: systemd-timesyncd
85-
state: started
86-
enabled: true
87-
notify: Reload systemd-timesyncd
88-
89-
- name: Create systemd-timesyncd configuration file
90-
ansible.builtin.copy:
91-
src: timesyncd.conf
92-
dest: /etc/systemd/timesyncd.conf
93-
mode: "0644"
94-
notify: Reload systemd-timesyncd

ansible/roles/host_setup/tasks/main.yml

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -121,3 +121,17 @@
121121
until: install_packages is success
122122
retries: 5
123123
delay: 2
124+
125+
- name: Ensure timesyncd is running
126+
ansible.builtin.service:
127+
name: systemd-timesyncd
128+
state: started
129+
enabled: true
130+
notify: Reload systemd-timesyncd
131+
132+
- name: Create systemd-timesyncd configuration file
133+
ansible.builtin.template:
134+
src: timesyncd.conf.j2
135+
dest: /etc/systemd/timesyncd.conf
136+
mode: "0644"
137+
notify: Reload systemd-timesyncd

0 commit comments

Comments
 (0)