processone / ejabberd-vagrant-dev

Vagrant and Ansible script to create a VM preconfigured for ejabberd development
31 stars 13 forks source link

Ansible tasks failing #8

Open robinsalehjan opened 7 years ago

robinsalehjan commented 7 years ago

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 😄

pilou- commented 7 years ago

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.

SidharthRaveendran commented 7 years ago

How do i resume provisioning once the process is interrupted?