Comment 13 for bug 1895138

Revision history for this message
Sandeep Yadav (sandeepyadav93) wrote :

Fix proposed to branch: master
Review: https://review.opendev.org/#/c/753540/

Remove "become" from baremetal-prep-virthost.yml

When running a playbook with become: true, it also runs the facts
module with sudo, so ansible_user_dir will have the value of the
root user, rather than the expected home directory of the
ansible_ssh_user.

Merge of patch[1] has uncovered this issue and below task is failing
during image build.
~~~
TASK [oooci-build-images : ironic-python-agent]
"Error when writing tar.tar archive at /root/ironic-python-agent.tar:
[Errno 13] Permission denied: '/root/ironic-python-agent.tar'"
~~~

Cause: During run of gather facts task in build-test-packages role -
ansible_user_dir fact got changed to "/root" because of become:true.

With this patch we are removing the not needed become:true.

[1] https://review.opendev.org/#/c/752681/