Fixed issue with IOS SSH connection. The default Ansible setting was to us PK auth so I changed it back to default and added an environment variable for the @home_linux@ collection to keep it working
This commit is contained in:
parent
1be008aca4
commit
b3f9331a12
@ -1,7 +1,8 @@
|
||||
all:
|
||||
home:
|
||||
hosts:
|
||||
192.168.1.50:
|
||||
192.168.1.51:
|
||||
192.168.1.52:
|
||||
192.168.1.53:
|
||||
|
||||
vars:
|
||||
ansible_ssh_private_key_file = /home/vraducanu/.ssh/id_rsa
|
||||
@ -1,5 +1,7 @@
|
||||
[baguleykit]
|
||||
172.16.1.254
|
||||
baguleykit:
|
||||
hosts:
|
||||
172.16.1.254:
|
||||
|
||||
[homekit]
|
||||
192.168.1.60
|
||||
homekit:
|
||||
hosts:
|
||||
192.168.1.60:
|
||||
@ -1,14 +0,0 @@
|
||||
---
|
||||
|
||||
- name: Test playbook - reads and prints device info
|
||||
hosts: homekit
|
||||
gather_facts: false
|
||||
connection: network_cli
|
||||
roles:
|
||||
- common
|
||||
|
||||
tasks:
|
||||
|
||||
- name: Run one command on device
|
||||
ios_command:
|
||||
commands: show version
|
||||
19
ios_devices/test_show_version.yml
Normal file
19
ios_devices/test_show_version.yml
Normal file
@ -0,0 +1,19 @@
|
||||
---
|
||||
|
||||
- name: Test playbook - reads and prints device info
|
||||
hosts: homekit
|
||||
gather_facts: false
|
||||
connection: network_cli
|
||||
roles:
|
||||
- common
|
||||
|
||||
tasks:
|
||||
|
||||
- name: Run "show version" command on devices
|
||||
ios_command:
|
||||
commands: show version
|
||||
register: output
|
||||
|
||||
- name: Print the output of "show version"
|
||||
debug:
|
||||
var: output.stdout_lines
|
||||
Loading…
Reference in New Issue
Block a user