Skip to content

Commit 9d7f4ea

Browse files
authored
ansible: Configure timsyncd to use AWS NTP servers (#2468)
Closer servers are better servers and these are the closest ones we can get.
1 parent dcae072 commit 9d7f4ea

1 file changed

Lines changed: 19 additions & 0 deletions

File tree

‎ansible/tasks/setup-system.yml‎

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -210,6 +210,25 @@
210210
owner: 'root'
211211
group: 'root'
212212

213+
- name: configure NTP client
214+
when: stage2
215+
block:
216+
- name: ensure conf directory exists
217+
ansible.builtin.file:
218+
path: /etc/systemd/timesyncd.conf.d
219+
state: directory
220+
mode: '0755'
221+
222+
- name: configure NTP server
223+
ansible.builtin.copy:
224+
content: |
225+
[Time]
226+
NTP=169.254.169.123 fd00:ec2::123
227+
dest: /etc/systemd/timesyncd.conf.d/10-aws-time-sync.conf
228+
mode: '0644'
229+
owner: root
230+
group: root
231+
213232
- name: Configure Apt
214233
ansible.builtin.copy:
215234
content: |

0 commit comments

Comments
 (0)