First make sure ansible can actually sign in to the target hosts before
trying to use roles. I’m guessing here but that role name indicates
something related which might impact the connection.

So best to start here:

https://docs.ansible.com/ansible/latest/user_guide/intro_getting_started.html#connecting-to-remote-nodes

And then try something simple such as the a file or copy task.
Once that works move on to more complicated things like roles.

Dick


On Sat, 21 Dec 2019 at 16:29, Nirmal Gauda <[email protected]> wrote:

> ansible.cfg :
>
>
> [defaults]
> inventory = ./inventories/
> Inventories :
>
>
> [leaf]
>
>
> leaf-1
> leaf-2
>
>
> playbook :
>
> - hosts: all
>   remote_user: admin
>   vars:
>     authorized_key_list:
>       - name: admin
>         authorized_keys:
>          - key: "{{ lookup('file', '~/.ssh/id_rsa.pub') }}"
>            state: present
>   roles:
>     - { role: GROG.authorized-key }
>
>
>
> On Saturday, 21 December 2019 20:27:59 UTC+5:30, Nirmal Gauda wrote:
>>
>> I am a Newbie to Ansible , writing my first playbook.
>>
>> I can not SSH / PING to network Devices.
>>
>> leaf-1 | UNREACHABLE! => {
>>     "changed": false,
>>     "msg": "Authentication failure.",
>>     "unreachable": true
>> }
>> leaf-2 | UNREACHABLE! => {
>>     "changed": false,
>>     "msg": "Authentication failure.",
>>     "unreachable": true
>> }
>>
>> i can PING / SSH to network devices from Ansible server but when i run
>> the playbook , it fails.
>>
>> No idea if i have to add something in playbook or ansible.cfg . Any
>> Suggestion please ?
>>
>>
>> --
> 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 view this discussion on the web visit
> https://groups.google.com/d/msgid/ansible-project/bff884e3-908c-472c-9d1c-ca784ef22087%40googlegroups.com
> <https://groups.google.com/d/msgid/ansible-project/bff884e3-908c-472c-9d1c-ca784ef22087%40googlegroups.com?utm_medium=email&utm_source=footer>
> .
>
-- 
Sent from a mobile device - please excuse the brevity, spelling and
punctuation.

-- 
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 view this discussion on the web visit 
https://groups.google.com/d/msgid/ansible-project/CAL8fbwPY0m1AUGvSKJoppx-wirMh-dh9niAAVoRBcc9Sfkre8w%40mail.gmail.com.

Reply via email to