fix parameters for module replace in 0060-resolvconf (#7858)
This commit is contained in:
parent
e2b67b5700
commit
7f309bb092
1 changed files with 2 additions and 4 deletions
|
@ -23,10 +23,9 @@
|
|||
|
||||
- name: Remove search/domain/nameserver options before block
|
||||
replace:
|
||||
dest: "{{ item[0] }}"
|
||||
path: "{{ item[0] }}"
|
||||
regexp: '^{{ item[1] }}[^#]*(?=# Ansible entries BEGIN)'
|
||||
backup: yes
|
||||
follow: yes
|
||||
with_nested:
|
||||
- "{{ [resolvconffile, base|default(''), head|default('')] | difference(['']) }}"
|
||||
- [ 'search ', 'nameserver ', 'domain ', 'options ' ]
|
||||
|
@ -34,11 +33,10 @@
|
|||
|
||||
- name: Remove search/domain/nameserver options after block
|
||||
replace:
|
||||
dest: "{{ item[0] }}"
|
||||
path: "{{ item[0] }}"
|
||||
regexp: '(# Ansible entries END\n(?:(?!^{{ item[1] }}).*\n)*)(?:^{{ item[1] }}.*\n?)+'
|
||||
replace: '\1'
|
||||
backup: yes
|
||||
follow: yes
|
||||
with_nested:
|
||||
- "{{ [resolvconffile, base|default(''), head|default('')] | difference(['']) }}"
|
||||
- [ 'search ', 'nameserver ', 'domain ', 'options ' ]
|
||||
|
|
Loading…
Reference in a new issue