rhtconsulting/rhc-ose

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

Opened this issue · 0 comments

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.