---
- hosts: Router1
gather_facts: true
connection: local
tasks:
- name: show run
ios_command:
commands:
- show run
host: "{{ ansible_host }}"
username: joe
password: cisco
register: sh_run
- debug: var=sh_run.stdout_lines