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.
Reviewed: https:/ /review. opendev. org/753540 /git.openstack. org/cgit/ openstack/ tripleo- quickstart- extras/ commit/ ?id=901a7428166 da1188b711fabce 4c19ebbd4b8715
Committed: https:/
Submitter: Zuul
Branch: master
commit 901a7428166da11 88b711fabce4c19 ebbd4b8715
Author: Sandeep Yadav <email address hidden>
Date: Wed Sep 23 13:35:43 2020 +0530
Remove "become" from baremetal- prep-virthost. yml
When running a playbook with become: true, it also runs the facts ssh_user.
module with sudo, so ansible_user_dir will have the value of the
root user, rather than the expected home directory of the
ansible_
Merge of patch[1] has uncovered this issue and below task is failing python- agent] python- agent.tar: ironic- python- agent.tar' "
during image build.
~~~
TASK [oooci-build-images : ironic-
"Error when writing tar.tar archive at /root/ironic-
[Errno 13] Permission denied: '/root/
~~~
Cause: During run of gather facts task in build-test-packages role - user_dir fact got changed to "/root" because of become:true.
ansible_
With this patch we are removing the not needed become:true.
[1] https:/ /review. opendev. org/#/c/ 752681/
Related-Bug: 1895138 4b52bd91a1b57d9 a23ff87d0b0
Change-Id: I7264cf9f3f9138