This is how I do it:

export ANSIBLE_REMOTE_USER=vagrant
export ANSIBLE_PRIVATE_KEY_FILE=$HOME/.vagrant.d/insecure_private_key
ssh-add $ANSIBLE_PRIVATE_KEY_FILE

- James

On Mon, Dec 23, 2013 at 9:24 AM, bryan hunt <picsolvebr...@gmail.com> wrote:
>
> Hi,
>
> I have been trying to get Ansible working with Vagrant for a day or two now.
>
> Vagrant instances are configured with a sudo enabled user, 'vagrant'.
>
> The auto-generated ssh config does not provide password-less access to the
> root account.
>
> So I guess vagrant will have to run it's commands using the 'vagrant' user
> account.
>
> But when I added the 'vvvv' flag to debug vagrant it transpired that it was
> trying to use the root account.
>
> I have spent some more time on it, and created a ticket :
> https://github.com/ansible/ansible/issues/5403
>
> But even using Ansible from the command line, I cannot get it to perform a
> ssh connection using any user but root.
>
> Has anyone else encountered a similar problem ?
>
> Thanks,
>
> Bryan Hunt
>
> --
> 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.
> For more options, visit https://groups.google.com/groups/opt_out.

-- 
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.
For more options, visit https://groups.google.com/groups/opt_out.

Reply via email to