On 12/22/19 5:51 AM, Nirmal Gauda wrote: > on more thing : i have logged in to ansible server as "root" but my username > to log in to network device is "admin" ... > do i have to define that somewhere ? >
Use the ansible_user variable. Further information: https://docs.ansible.com/ansible/latest/user_guide/intro_inventory.html#connecting-to-hosts-behavioral-inventory-parameters Regards Racke > On Saturday, 21 December 2019 22:10:25 UTC+5:30, Nirmal Gauda wrote: > > | > [root@ansible01 test]# ping leaf-1 > PING leaf-1.lab.com (192.168.7.1)56(84)bytes of data. > 64bytes fromtesting_1F.lab.com (192.168.7.1):icmp_seq=1ttl=253time=0.701ms > 64bytes fromtesting_1F.lab.com (192.168.7.1):icmp_seq=2ttl=253time=0.623ms > 64bytes fromtesting_1F.lab.com (192.168.7.1):icmp_seq=3ttl=253time=0.736ms > | > > | > [root@ansible01 test]# ansible leaf-1 -m ping > > /usr/lib/python2.7/site-packages/requests/__init__.py:80:RequestsDependencyWarning:urllib3 > (1.22)orchardet > (2.2.1)doesn't match a supported version! > RequestsDependencyWarning) > leaf-1 | UNREACHABLE! => { > "changed": false, > "msg": "Failed to connect to the host via ssh: > | > > 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] > <mailto:[email protected]>. > To view this discussion on the web visit > https://groups.google.com/d/msgid/ansible-project/ec803d2b-08a7-4f55-b212-a98ca902ad28%40googlegroups.com > <https://groups.google.com/d/msgid/ansible-project/ec803d2b-08a7-4f55-b212-a98ca902ad28%40googlegroups.com?utm_medium=email&utm_source=footer>. -- Ecommerce and Linux consulting + Perl and web application programming. Debian and Sympa administration. Provisioning with Ansible. -- 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/912cf75c-b6e4-0c4e-160e-4290226c688d%40linuxia.de.
signature.asc
Description: OpenPGP digital signature
