Open robinsalehjan opened 8 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.
How do i resume provisioning once the process is interrupted?
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
Cheers 😄