Skip to content

Commit

Permalink
Merge pull request kubernetes-sigs#1146 from mattymo/resolvconf_optimize
Browse files Browse the repository at this point in the history
Condense resolvconf sources before starting loop
  • Loading branch information
mattymo authored Mar 17, 2017
2 parents 25bff85 + a520641 commit 3cfb76e
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions roles/kubernetes/preinstall/tasks/resolvconf.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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


Expand Down

0 comments on commit 3cfb76e

Please sign in to comment.