bellroy / lesswrong

Less Wrong platform
http://lesswrong.org/
Other
49 stars 23 forks source link

Ansible fails to chown a file in "Create lesswrong DB user" #590

Closed brendanlong closed 7 years ago

brendanlong commented 7 years ago

I'm on OS X, using vagrant 1.8.7 and Ansible 2.2.0.0.

If I clone lesswrong and run vagrant up, it fails at this step:

TASK [Create lesswrong DB user] ************************************************
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-1479247561.91-256980135667654/': Operation not permitted\nchown: changing ownership of `/tmp/ansible-tmp-1479247561.91-256980135667654/postgresql_user.py': Operation not permitted\n). For information on working around this, see https://docs.ansible.com/ansible/become.html#becoming-an-unprivileged-user"}

I looked at the relevant part of playbook.yml but I don't see anything obviously wrong with it (I'm not an ansible expert though):

    - name: Create lesswrong DB user
      postgresql_user:
        name=lesswrong
        password=lesswr0ng
      become: yes
      become_user: postgres
brendanlong commented 7 years ago

Apparently this is not a bug:

Note: you will likely need the older versions Virtual Box 5.0 and Vagrant 1.7.4. There appears to be a bug in later versions that is incompatible with the existing Vagrantfile