ansible errors on provision or up
Ansible version is 2.1?
(girder)elysium:HPCCloud-deploy tristan$ vagrant provision
==> hpccloud: Running provisioner: ansible...
hpccloud: Running ansible-playbook...
PYTHONUNBUFFERED=1 ANSIBLE_FORCE_COLOR=true ANSIBLE_HOST_KEY_CHECKING=false ANSIBLE_SSH_ARGS='-o UserKnownHostsFile=/dev/null -o IdentitiesOnly=yes -o ControlMaster=auto -o ControlPersist=60s' ansible-playbook --connection=ssh --timeout=30 --limit='hpccloud' --inventory-file=/Users/tristan/Envs/girder/HPCCloud-deploy/.vagrant/provisioners/ansible/inventory --extra-vars={"default_user":"vagrant","development":"1","hpccloud_password":"letmein","demo":false} -vv ansible/site.yml
PLAY [None] *******************************************************************
GATHERING FACTS ***************************************************************
<127.0.0.1> REMOTE_MODULE setup
ok: [hpccloud]
TASK: [fail msg="Playbook requires ansible >= {{required_ansible_version}}"] ***
failed: [hpccloud] => {"failed": true}
msg: Playbook requires ansible >= 2.0.2
FATAL: all hosts have already failed -- aborting
PLAY RECAP ********************************************************************
to retry, use: --limit @/Users/tristan/site.retry
hpccloud : ok=1 changed=0 unreachable=0 failed=1
Ansible failed to complete successfully. Any error output should be
visible above. Please fix these errors and try again.
(girder)elysium:HPCCloud-deploy tristan$
Yes 2.1 will do it.
wait...
(girder)elysium:HPCCloud-deploy tristan$ ansible --version
ansible 1.9.4
why would I keep getting this after
sudo pip install --upgrade ansible==2.1
it was falling back on an ansible version I had in /usr/bin/python instead of virtualenv's x_X
closing
Different message now:
{"failed": true, "msg": "Failed to set permissions on the temporary files Ansible needs to create when
becoming an unprivileged user. For information on working around this, see
https://docs.ansible.com/ansible/become.html#becoming-an-unprivileged-user"}
Nothing apparent in the docs, not like I need to run sudo vagrant up?
What task is it failing on?
...
PLAY [Common configuration] ****************************************************
TASK [setup] *******************************************************************
fatal: [hpccloud]: FAILED! => {"failed": true, "msg": "Failed to set permissions on the temporary files Ansible needs to create when becoming an unprivileged user. For information on working around this, see https://docs.ansible.com/ansible/become.html#becoming-an-unprivileged-user"}
NO MORE HOSTS LEFT *************************************************************
to retry, use: --limit @ansible/site.retry
PLAY RECAP *********************************************************************
hpccloud : ok=6 changed=4 unreachable=0 failed=1
Ansible failed to complete successfully. Any error output should be
visible above. Please fix these errors and try again.
Please try this, in ansible/roles/common/tasks/main.yml please add 'become: yes', where ever you see become_user
This is a known issue that is common for vagrant deployments because the default user for connecting to the machine is vagrant not root. This means when ever you become a non-root user (e.g. hpccloud or celery) you run into the 'becoming an unprivileged user' error. Because the machine is a trusted host (its a VM after all) I would recommend we add allow_world_readable_tmpfiles to the Vagrantfile's ansible.extra_vars which (i believe) should resolve the issue.
Tried rebranching from master added allow_world_readable_tmpfiles: true to ansible.extra_vars with no luck
This may need to go into the ansible.cfg file to work (e.g. it may be processed before extra_vars are taken into account). If that doesn't work we'll have to do a little deeper digging.