Hello All,
During SAS Viya 3.4 installation on AWS Linux node having that error message at the end
fatal: [deployTarget]: FAILED! => {"changed": false, "msg": "Failed to create remote module tmp path at dir /tmp/.root.ansible/ with prefix ansible-moduletmp-1567623975.36-: [Errno 13] Permission denied: '/tmp/.root.ansible/ansible-moduletmp-1567623975.36-N_Ec8S'"}
2019-09-04 19:06:15,380 p=18476 u=root | NO MORE HOSTS LEFT *************************************************************
2019-09-04 19:06:15,381 p=18476 u=root | PLAY RECAP *********************************************************************
2019-09-04 19:06:15,381 p=18476 u=root | deployTarget : ok=208 changed=65 unreachable=0 failed=1
2019-09-04 19:06:15,381 p=18476 u=root | localhost : ok=14 changed=1 unreachable=0 failed=0
Please advise
Thanks in advance
Thanks,
Asif
Hello,
Hope you resolved your issu.
This can happen when you run the ansible-playbook with sudo. You should instead run it as a normal user, but use the switch to give ansible your sudo password.
Regard,
Jérôme
Ran into this same issue. The work around I figured out was to set the permissions for the /tmp/.root.ansible directory to 777.
sudo chmod -R 777 /tmp/.root.ansible
Thanks Willhaley, I'll definitely apply your resolution step and i'll let you know with end results.
Thanks for your help
Appreciated 🙂
I tried your solution @willhaley but still having same error msg. I don't know what is the issue
Thanks,
Asif
Hello,
Hope you resolved your issu.
This can happen when you run the ansible-playbook with sudo. You should instead run it as a normal user, but use the switch to give ansible your sudo password.
Regard,
Jérôme
Hi All,
Another solution for this issue. Set create a directory at /tmp (For Ex. /tmp/ansiblelog and mention it as log directory in Ansible.cfg with proper permission to the installing user id.
Thanks
I would not suggest modifiying the directories permissions or the Ansible.config directly. While you might get rid of the error message during the installation, you might also end up with a broken installation if files/directories/dependencies are not installed with the proper users/rights. Use with caution.
Hi,
Can you copy the command line you use to do the installation?
The explication is that ansible will run certain task as root, and others as the installation user. Therefore, you must provide Ansible with the sudo password with the switch --ask-become-pass. If you typed sudo before the command, Some file/directory that should have been created as the installation user belong to root. Therefore the install user cannot access them later in the process.
Correct:
ansible-playbook site.yml --ask-become-pass -vvv
Not correct:
sudo ansible-playbook site.yml -vvv
Jérôme
Are you ready for the spotlight? We're accepting content ideas for SAS Innovate 2025 to be held May 6-9 in Orlando, FL. The call is open until September 25. Read more here about why you should contribute and what is in it for you!