Condense resolvconf sources before starting loop

This commit is contained in:
Matthew Mosesohn 2017-03-16 17:58:17 +03:00
parent 7575d83467
commit 2586d01345

View file

@ -28,9 +28,8 @@
backup: yes
follow: yes
with_nested:
- "{{ [resolvconffile] + [base|default('')] + [head|default('')] }}"
- "{{ [resolvconffile, base|default(''), head|default('')] | difference(['']) }}"
- [ 'search ', 'nameserver ', 'domain ', 'options ' ]
when: item[0] != ""
notify: Preinstall | restart network
- name: Remove search/domain/nameserver options after block
@ -41,9 +40,8 @@
backup: yes
follow: yes
with_nested:
- "{{ [resolvconffile] + [base|default('')] + [head|default('')] }}"
- "{{ [resolvconffile, base|default(''), head|default('')] | difference(['']) }}"
- [ 'search ', 'nameserver ', 'domain ', 'options ' ]
when: item[0] != ""
notify: Preinstall | restart network