From: Zack Cerza Date: Tue, 10 Jan 2017 22:58:33 +0000 (-0700) Subject: Ensure search domain is set in resolv.conf X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=867ea64345ca67972562010010a47b07352662eb;p=ceph-cm-ansible.git Ensure search domain is set in resolv.conf Signed-off-by: Zack Cerza --- diff --git a/roles/testnode/tasks/resolvconf.yml b/roles/testnode/tasks/resolvconf.yml index 95c42409..8017a1ed 100644 --- a/roles/testnode/tasks/resolvconf.yml +++ b/roles/testnode/tasks/resolvconf.yml @@ -48,3 +48,9 @@ when: bounce_interface == "True" or (ansible_distribution|lower == 'ubuntu' and ansible_distribution_major_version|int >= 16) + +- name: Ensure lab_domain is in search domains in /etc/resolv.conf + lineinfile: + dest: /etc/resolv.conf + regexp: "^search .*" + line: "search {{ lab_domain }}"