Yea, the box comes up fine and the private key works, as it should, but
ansible fails when executing the playbook:
Here is the error output:

==> proxy01: Running provisioner: ansible...
    proxy01: Running ansible-playbook...

PLAY [all]
*********************************************************************

TASK [Gathering Facts]
*********************************************************
fatal: [web02]: UNREACHABLE! => {"changed": false, "msg": "Failed to
connect to the host via ssh: ", "unreachable": true}
fatal: [proxy01]: UNREACHABLE! => {"changed": false, "msg": "Failed to
connect to the host via ssh: ssh: Could not resolve hostname proxy01:
nodename nor servname provided, or not known", "unreachable": true}
fatal: [proxy02]: UNREACHABLE! => {"changed": false, "msg": "Failed to
connect to the host via ssh: ssh: Could not resolve hostname proxy02:
nodename nor servname provided, or not known", "unreachable": true}

Am I correct in assuming ansible reads ~/.ssh/config to SSH into the
vagrant box?

Much obliged!




On Wed, Aug 12, 2020 at 8:09 AM D Morgan <dnmor...@gmail.com> wrote:

> If you comment out these three lines does it work as expected?
>
> subconfig.ssh.private_key_path = ["/Users/jason/.ssh/vagrant",
> "~/.vagrant.d/insecure_private_key"]
> subconfig.vm.provision "file", source: "/Users/jason/.ssh/vagrant.pub",
> destination: "~/.ssh/authorized_keys"
> subconfig.ssh.insert_key = false
>
>
>
> On Wednesday, August 12, 2020 at 9:34:34 AM UTC-4, jason.wi...@gmail.com
> wrote:
>>
>> Hey folks.
>> Looking for some help on how to get my setup working correctly.
>> I can use ansible AFTER vagrant up is working, by running:
>>
>> vagrant ssh-config >> ~/.ssh/config
>>  Now can read the file and SSH into the host and run the playbooks.
>>
>> How does that work when i am running ansilbe within vagrant up? Do you
>> need to add the hosts into ~/.ssh/config ahead of time?
>> Just looking for help on how to get this working properly
>>
>> Thanks
>>
> --
> This mailing list is governed under the HashiCorp Community Guidelines -
> https://www.hashicorp.com/community-guidelines.html. Behavior in
> violation of those guidelines may result in your removal from this mailing
> list.
>
> GitHub Issues: https://github.com/hashicorp/vagrant/issues
> Discuss: https://discuss.hashicorp.com/c/vagrant/24
> ---
> You received this message because you are subscribed to a topic in the
> Google Groups "Vagrant" group.
> To unsubscribe from this topic, visit
> https://groups.google.com/d/topic/vagrant-up/LWuwDW97f04/unsubscribe.
> To unsubscribe from this group and all its topics, send an email to
> vagrant-up+unsubscr...@googlegroups.com.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/vagrant-up/a09130c8-e73b-4f07-b945-3a7057269402o%40googlegroups.com
> <https://groups.google.com/d/msgid/vagrant-up/a09130c8-e73b-4f07-b945-3a7057269402o%40googlegroups.com?utm_medium=email&utm_source=footer>
> .
>

-- 
This mailing list is governed under the HashiCorp Community Guidelines - 
https://www.hashicorp.com/community-guidelines.html. Behavior in violation of 
those guidelines may result in your removal from this mailing list.

GitHub Issues: https://github.com/hashicorp/vagrant/issues
Discuss: https://discuss.hashicorp.com/c/vagrant/24
--- 
You received this message because you are subscribed to the Google Groups 
"Vagrant" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to vagrant-up+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/vagrant-up/CAA%3DN2EVRUzNccu%2BZAXfnZNmwvP6_Pur4b8wsataFhmi5y-Lf%3Dg%40mail.gmail.com.

Reply via email to