warning loop var redefine

This commit is contained in:
135
2023-10-13 12:01:43 +03:00
parent 22f3718c7e
commit 6d215274c9

View File

@@ -17,11 +17,13 @@
- name: "configure systemd-timesyncd"
lineinfile:
path: /etc/systemd/timesyncd.conf
regexp: '{{ item.regexp }}'
line: '{{ item.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: cfg
- name: "stop and disable chronyd"
when: ansible_facts.services['chrony.service'] is defined