rhtconsulting / rhc-ose

OpenShift Automation and Utilities by Red Hat Consulting
42 stars 34 forks source link

Unable to edit resolv.conf on ose-provision.yml run if using a VM vs. a container #198

Open vvaldez opened 8 years ago

vvaldez commented 8 years ago

When running the latest ose-provision.yml the following task errors out:

TASK: [Edit /etc/resolv.conf in container] ************************************ 
failed: [localhost] => {"changed": true, "cmd": "sed '0,/.*nameserver.*/s/.*nameserver.*/nameserver 10.9.49.147\\n&/' /etc/resolv.conf > /tmp/resolv.conf && /bin/cp -f /tmp/resolv.conf /etc/resolv.conf", "delta": "0:00:00.005012", "end": "2016-06-29 13:53:17.426475", "rc": 1, "start": "2016-06-29 13:53:17.421463", "warnings": ["Consider using template or lineinfile module rather than running sed"]}
stderr: /bin/cp: cannot remove ‘/etc/resolv.conf’: Permission denied

FATAL: all hosts have already failed -- aborting

Enabling ansible_sudo: true or become: yes works around this.