(ansible) Tonys-MacBook-Pro:ansible tonywong$ ansible -m ping -i hosts all
-vvv
ansible 2.9.10
  config file = None
  configured module search path =
['/Users/tonywong/.ansible/plugins/modules',
'/usr/share/ansible/plugins/modules']
  ansible python module location =
/Users/tonywong/virtualenv/ansible/lib/python3.7/site-packages/ansible
  executable location = /Users/tonywong/virtualenv/ansible/bin/ansible
  python version = 3.7.7 (default, Mar 10 2020, 15:43:03) [Clang 11.0.0
(clang-1100.0.33.17)]
No config file found; using defaults
host_list declined parsing /Users/tonywong/virtualenv/ansible/hosts as it
did not pass its verify_file() method
script declined parsing /Users/tonywong/virtualenv/ansible/hosts as it did
not pass its verify_file() method
auto declined parsing /Users/tonywong/virtualenv/ansible/hosts as it did
not pass its verify_file() method
Parsed /Users/tonywong/virtualenv/ansible/hosts inventory source with ini
plugin
META: ran handlers
<192.168.0.99> ESTABLISH SSH CONNECTION FOR USER: vagrant
<192.168.0.99> SSH: EXEC ssh -C -o ControlMaster=auto -o ControlPersist=60s
-o KbdInteractiveAuthentication=no -o
PreferredAuthentications=gssapi-with-mic,gssapi-keyex,hostbased,publickey
-o PasswordAuthentication=no -o 'User="vagrant"' -o ConnectTimeout=10 -o
ControlPath=/Users/tonywong/.ansible/cp/f877efebcb 192.168.0.99 '/bin/sh -c
'"'"'echo ~vagrant && sleep 0'"'"''
<192.168.0.99> (255, b'', b'vagrant@192.168.0.99: Permission denied
(publickey,password).\r\n')
192.168.0.99 | UNREACHABLE! => {
    "changed": false,
    "msg": "Failed to connect to the host via ssh: vagrant@192.168.0.99:
Permission denied (publickey,password).",
    "unreachable": true
}

On Tue, Jul 21, 2020 at 7:07 AM Tony Wong <tdubb...@gmail.com> wrote:

> didnt think I needed to do this but using -u gives permission denied
>
>
> ansible) Tonys-MacBook-Pro:ansible tonywong$ ansible -m ping -i hosts
> servers -u vagrant
> 192.168.0.99 | UNREACHABLE! => {
>     "changed": false,
>     "msg": "Failed to connect to the host via ssh: vagrant@192.168.0.99:
> Permission denied (publickey,password).",
>     "unreachable": true
> }
>
> On Tue, Jul 21, 2020 at 7:03 AM Tony Wong <tdubb...@gmail.com> wrote:
>
>> I dont understand now I am seeing this
>>
>>
>> (ansible) Tonys-MacBook-Pro:ansible tonywong$ ansible -m ping -i hosts
>> servers
>> The authenticity of host '192.168.0.99 (192.168.0.99)' can't be
>> established.
>> ECDSA key fingerprint is
>> SHA256:7qu28ehihcaflJvAR+UT9g4bAK4khkIh1gAZluMC1fg.
>> Are you sure you want to continue connecting (yes/no/[fingerprint])?
>>
>>
>> below is my hosts file
>>
>> why is it asking me for this?
>>
>> [servers]
>> 192.168.0.99
>>
>> [servers:vars]
>> ansible_ssh_user=vagrant
>> ansible_ssh_private_key=~/.vagrant.d/insecure_private_key
>>
>>
>>
>>
>> On Mon, Jul 20, 2020 at 10:05 PM Tony Wong <tdubb...@gmail.com> wrote:
>>
>>> thanks for catching that. now getting this
>>>
>>>
>>> 192.168.0.127 | UNREACHABLE! => {
>>>     "changed": false,
>>>     "msg": "Failed to connect to the host via ssh: ssh: connect to host
>>> 192.168.0.127 port 22: Operation not permitted",
>>>     "unreachable": true
>>> }
>>> 192.168.0.151 | UNREACHABLE! => {
>>>     "changed": false,
>>>     "msg": "Failed to connect to the host via ssh: ssh: connect to host
>>> 192.168.0.151 port 22: Operation not permitted",
>>>     "unreachable": true
>>> }
>>>
>>> On Mon, Jul 20, 2020 at 9:17 PM ej <climbdar...@gmail.com> wrote:
>>>
>>>>
>>>> Please change ansible_ssh_pass=vagrant to ansible_ssh_user=vagrant
>>>>
>>>> --
>>>> 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 view this discussion on the web visit
>>>> https://groups.google.com/d/msgid/ansible-project/a8e3020d-e61b-4d5e-a285-ccd3823b24f4o%40googlegroups.com
>>>> .
>>>>
>>>

-- 
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 view this discussion on the web visit 
https://groups.google.com/d/msgid/ansible-project/CALmkhkpbD%3DCfx0Vg4%3DmO4ZGLhyYqpd%3D6W%2BseZVLYt%3D7x-iZgqQ%40mail.gmail.com.

Reply via email to