redhat-openstack / tripleo-quickstart

Ansible roles for setting up TripleO virtual environments and building images
16 stars 15 forks source link

Running with virthost=localhost may lead to sadness and doom #36

Closed larsks closed 8 years ago

larsks commented 8 years ago

If someone tries running quickstart against an inventory file like this:

[virthost]
localhost ansible_user=admin

And they are not logged in as the admin user where they are running the quickstart, confusion will result: because the playbooks assume that delegate_to: localhost will run as the current user, but in this situation that isn't true, and they will get permission errors when tasks try to write to /home/currentuser/.quickstart.

The solution right now is "don't target localhost as a different user".

halcyondude commented 8 years ago

we could add a task to a relevant place that checks for this condition and (until we have a better answer) emits a scary message forewarning said sadness and doom.

larsks commented 8 years ago

I think we have a better solution in https://review.gerrithub.io/#/c/266269/

halcyondude commented 8 years ago

{nod} +1

larsks commented 8 years ago

There are some ansible bugs related to host delegation (e.g., tasks that have delegate_to: or local_action:) that we're working around in our current playbooks. There was just a change committed (https://github.com/ansible/ansible/pull/15024) that should resolve these problems, so we may want to watch for that to show up in a release. It was committed t the 2.0-stable branch so should show up in anything more recent than 2.0.1.0.