On Monday, 12 February 2018 11.51.55 CET 'Daley Okuwa' via Ansible Project wrote: > I am trying to backup my config on a router > but I want to use the login details on the router for ansible e.g admin as > written below to use to log into the router and not the ansible user on the > ansible server > Please tell me how I can do this . > when this playbook is run it uses the ansible user to log in > > > - name: collect default set of facts > hosts: 10.101.250.41 > tasks: > - name: collect default sets of facts and configuration > junos_facts: > gather_subset: config > username: admin > password: xxxxx
When connecting to network devices you need to use "connection: local" on the play or "delegate_to: localhost" on the task. -- Kai Stian Olstad -- 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 firstname.lastname@example.org. To view this discussion on the web visit https://groups.google.com/d/msgid/ansible-project/2357574.abgAGzgeJ7%40x1. For more options, visit https://groups.google.com/d/optout.