ejabberd-vagrant-dev icon indicating copy to clipboard operation
ejabberd-vagrant-dev copied to clipboard

Ansible tasks failing

Open robinsalehjan opened this issue 9 years ago • 2 comments

OS macOS Sierra, version 10.12.11

Version ansible 2.2 Vagrant 1.8.6

Failing task TASK [postgresql : Ensure ejabberd_test database is created] *******************

Output fatal: [default]: FAILED! => {"failed": true, "msg": "Failed to set permissions on the temporary files Ansible needs to create when becoming an unprivileged user (rc: 1, err: chown: changing ownership of /tmp/ansible-tmp-1478502645.12-182829440038045/: Operation not permitted\nchown: changing ownership of /tmp/ansible-tmp-1478502645.12-182829440038045/postgresql_db.py: Operation not permitted\n). For information on working around this, see https://docs.ansible.com/ansible/become.html#becoming-an-unprivileged-user"}

Partial solution I got it working by creating a ansible.cfg file in the top-level directory (where Vagrantfile is located). See below for example:

ansible.cfg

[defaults] 
allow_world_readable_tmpfiles = True

Cheers 😄

robinsalehjan avatar Nov 07 '16 10:11 robinsalehjan

This error is expected when the user making the connection and the become user are unprivileged, see https://docs.ansible.com/ansible/become.html#becoming-an-unprivileged-user.

pilou- avatar Jun 09 '17 09:06 pilou-

How do i resume provisioning once the process is interrupted?

SidharthRaveendran avatar Jun 20 '17 10:06 SidharthRaveendran