Compare commits

...

2 Commits

Author SHA1 Message Date
135
dd4b6c75c2 Merge branch 'main' of git.patriot23.ru:135/role-systemd-timesyncd
# Conflicts:
#	tasks/main.yml
2023-10-20 11:30:31 +03:00
135
6d215274c9 warning loop var redefine 2023-10-13 12:01:43 +03:00

View File

@@ -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