warning loop var redefine
This commit is contained in:
@@ -17,11 +17,13 @@
|
|||||||
- name: "configure systemd-timesyncd"
|
- name: "configure systemd-timesyncd"
|
||||||
lineinfile:
|
lineinfile:
|
||||||
path: /etc/systemd/timesyncd.conf
|
path: /etc/systemd/timesyncd.conf
|
||||||
regexp: '{{ item.regexp }}'
|
regexp: '{{ cfg.regexp }}'
|
||||||
line: '{{ item.line }}'
|
line: '{{ cfg.line }}'
|
||||||
loop:
|
loop:
|
||||||
- { 'regexp': '^#*NTP=.*$', 'line': 'NTP={{ ntp | default("") | join(" ") }}'}
|
- { 'regexp': '^#*NTP=.*$', 'line': 'NTP={{ ntp | default("") | join(" ") }}'}
|
||||||
- { 'regexp': '^#*FallbackNTP=.*$', 'line': 'FallbackNTP={{ fallback_ntp | default("") | join(" ") }}'}
|
- { 'regexp': '^#*FallbackNTP=.*$', 'line': 'FallbackNTP={{ fallback_ntp | default("") | join(" ") }}'}
|
||||||
|
loop_control:
|
||||||
|
loop_var: cfg
|
||||||
|
|
||||||
- name: "stop and disable chronyd"
|
- name: "stop and disable chronyd"
|
||||||
when: ansible_facts.services['chrony.service'] is defined
|
when: ansible_facts.services['chrony.service'] is defined
|
||||||
|
|||||||
Reference in New Issue
Block a user