Compare commits
2 Commits
d83d49e611
...
dd4b6c75c2
| Author | SHA1 | Date | |
|---|---|---|---|
| dd4b6c75c2 | |||
| 6d215274c9 |
@@ -17,13 +17,13 @@
|
||||
- name: "configure systemd-timesyncd"
|
||||
lineinfile:
|
||||
path: /etc/systemd/timesyncd.conf
|
||||
regexp: '{{ titem.regexp }}'
|
||||
line: '{{ titem.line }}'
|
||||
regexp: '{{ cfg.regexp }}'
|
||||
line: '{{ cfg.line }}'
|
||||
loop:
|
||||
- { 'regexp': '^#*NTP=.*$', 'line': 'NTP={{ ntp | default("") | join(" ") }}'}
|
||||
- { 'regexp': '^#*FallbackNTP=.*$', 'line': 'FallbackNTP={{ fallback_ntp | default("") | join(" ") }}'}
|
||||
loop_control:
|
||||
loop_var: titem
|
||||
loop_var: cfg
|
||||
|
||||
- name: "stop and disable chronyd"
|
||||
when: ansible_facts.services['chrony.service'] is defined
|
||||
@@ -39,5 +39,4 @@
|
||||
enabled: yes
|
||||
state: started
|
||||
masked: no
|
||||
become: true
|
||||
notify: systemd-timesyncd configuration changed
|
||||
Reference in New Issue
Block a user