Ansible views Vagrant as no different than any other computer. I believe it should set ansible_ssh_port in inventory.
If you can paste what kind of errors you are seeing and your ansible version it might be more clear what you're talking about, but I don't understand "get hit by the special handling" means in this particular case exactly. More information would be useful. On Wed, Aug 13, 2014 at 10:59 AM, Jeppe Toustrup <ten...@tenzer.dk> 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 ansible-project+unsubscr...@googlegroups.com. > To post to this group, send email to ansible-project@googlegroups.com. > To view this discussion on the web visit > https://groups.google.com/d/msgid/ansible-project/23c697de-1916-40ae-802b-fb1618ce28ab%40googlegroups.com > <https://groups.google.com/d/msgid/ansible-project/23c697de-1916-40ae-802b-fb1618ce28ab%40googlegroups.com?utm_medium=email&utm_source=footer> > . > > For more options, visit https://groups.google.com/d/optout. > -- 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 ansible-project+unsubscr...@googlegroups.com. To post to this group, send email to ansible-project@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/ansible-project/CA%2BnsWgyDrQHEs22TFOZMk_MFBTW1A-FyKZ3c4jH2kMf_6XSu0Q%40mail.gmail.com. For more options, visit https://groups.google.com/d/optout.