Skip to content
Snippets Groups Projects
Commit 34232a17 authored by Smaine Kahlouch's avatar Smaine Kahlouch Committed by GitHub
Browse files

Merge pull request #410 from dis-xcom/fix-resolvconf-discovery

Fix resolvconf executable discovery
parents cf502735 0fa90ec9
No related branches found
No related tags found
No related merge requests found
......@@ -59,13 +59,14 @@
- name: check resolvconf
stat: path=/etc/resolvconf/resolv.conf.d/head
shell: which resolvconf
register: resolvconf
ignore_errors: yes
- name: target resolv.conf file
set_fact:
resolvconffile: >-
{%- if resolvconf.stat.exists == True -%}/etc/resolvconf/resolv.conf.d/head{%- else -%}/etc/resolv.conf{%- endif -%}
{%- if resolvconf.rc == 0 -%}/etc/resolvconf/resolv.conf.d/head{%- else -%}/etc/resolv.conf{%- endif -%}
- name: Add search resolv.conf
lineinfile:
......@@ -109,6 +110,6 @@
- name: update resolvconf
command: resolvconf -u
changed_when: False
when: resolvconf.stat.exists == True
when: resolvconf.rc == 0
- meta: flush_handlers
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment