ansible-python3-role icon indicating copy to clipboard operation
ansible-python3-role copied to clipboard

Permission denied during cleanup

Open ahmedbodi opened this issue 5 years ago • 2 comments

RUNNING HANDLER [mdklatt.tmpdir : tmpdir remove] ******************************* fatal: [electrumx.multicoin.co]: FAILED! => {"changed": false, "msg": "rmtree failed: [Errno 13] Permission denied: '/tmp/ansible.nslmf_jp'"}

ahmedbodi avatar Jun 06 '20 20:06 ahmedbodi

@ahmedbodi

It looks like you're doing a pyenv installation as a user other than ansible_user_id. You need to set tmpdir_force to true, which will remove the python3_tmpdir directory with privilege escalation.


roles:
  - name: python3
    python3_pyenv: "..."
    tmpdir_force: true

mdklatt avatar Jun 07 '20 15:06 mdklatt

Need to add better documentation for pyenv installation as an alternate user.

mdklatt avatar Jun 07 '20 15:06 mdklatt