Merge pull request #1146 from mattymo/resolvconf_optimize

Condense resolvconf sources before starting loop
pull/1156/head
Matthew Mosesohn 2017-03-17 18:42:32 +03:00 committed by GitHub
commit 3cfb76e57f
1 changed files with 2 additions and 4 deletions

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