add the command "rm /etc/resolve.conf" in cache_prep_commands 37/57037/1
authorwutianwei <wutianwei1@huawei.com>
Thu, 3 May 2018 02:38:44 +0000 (10:38 +0800)
committerwutianwei <wutianwei1@huawei.com>
Fri, 4 May 2018 01:09:43 +0000 (01:09 +0000)
Change-Id: I89b15e7e200d37ac5d44cfee974f0f1c63981625
Signed-off-by: wutianwei <wutianwei1@huawei.com>
deploy/adapters/ansible/roles/config-osa/tasks/main.yml

index 74d930e..7e2585c 100755 (executable)
     insertafter: "^- include: os-trove"
     line: "- include: os-tacker-install.yml"
 
+- name: rm command "rm -f /etc/resolv.conf" in cache_prep_commands
+  lineinfile:
+    dest: /etc/ansible/roles/lxc_hosts/vars/ubuntu-16.04.yml
+    regexp: 'rm -f /etc/resolv.conf$'
+    line: '      echo "ok"'
+
+- name: add command "rm /etc/resolv.conf || true" in cache_prep_commands
+  lineinfile:
+    dest: /etc/ansible/roles/lxc_hosts/vars/ubuntu-16.04.yml
+    insertafter: '^  cache_prep_commands:'
+    line: '    rm /etc/resolv.conf || true'
+
 - name: add variables file of tacker for centos
   copy:
     src: redhat-7.yml