Here's what I do to gain some other benefits: - I let Vagrant dynamically generate the hosts file that is later used by Ansible. - the Vagrant boxes use a different subnet thus not conflicting with the corner case described above.
On Wednesday, 13 August 2014 16:59:52 UTC+2, Jeppe Toustrup wrote: > > Sorry for bringing up a (somewhat) old topic, but what about the use case > where Ansible is used to configure a Vagrant VM? In that case the VM would > be accessible through 127.0.0.1:2222, and thus get hit by the special > handling in the synchronization module. This means if you want to write to > a path where the unprivileged/'vagrant' user doesn't have write > permissions, you will have to add the non-obvious 'rsync_path="sudo rsync"' > to your task configuration, instead of just adding 'sudo: True' like > everywhere else in order to get the same result. > > I don't know if there's a good way to detect situations like this so > 'sudo: True' can have the proper effect. If not, then I think it might be > worth mentioning explicitly in the documentation for the module. > -- You received this message because you are subscribed to the Google Groups "Ansible Project" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To post to this group, send email to [email protected]. To view this discussion on the web visit https://groups.google.com/d/msgid/ansible-project/26f7adcc-0619-49c0-9af3-1f35c9441b9a%40googlegroups.com. For more options, visit https://groups.google.com/d/optout.
