From 4399eeec37bbacafe56b7ad0ea58af92738df839 Mon Sep 17 00:00:00 2001 From: Vlad Raducanu Date: Wed, 21 Apr 2021 11:04:11 +0100 Subject: [PATCH] Added test to troubleshoot issues between Ansible on WSL and IOS devices --- ios_devices/first_playbook.yml | 8 +++++--- ios_devices/inventory.yml | 9 +++++---- ios_devices/roles/common/vars/main.yml | 24 ++++++++++-------------- ios_devices/test.yml | 14 ++++++++++++++ 4 files changed, 34 insertions(+), 21 deletions(-) create mode 100644 ios_devices/test.yml diff --git a/ios_devices/first_playbook.yml b/ios_devices/first_playbook.yml index 46500f2..d99baf5 100644 --- a/ios_devices/first_playbook.yml +++ b/ios_devices/first_playbook.yml @@ -1,15 +1,17 @@ --- -## Playbook for reading and saving the running config of IOS devices using legacy CLI commands +## Playbook for reading and printing device information -- hosts: all +- name: First playbook - reads and prints device info + hosts: homekit gather_facts: false + connection: network_cli roles: - common tasks: - name: Collect device configuration - cisco.ios.ios_facts: + ios_facts: gather_subset: all register: current_config diff --git a/ios_devices/inventory.yml b/ios_devices/inventory.yml index 0161f31..08c05c1 100644 --- a/ios_devices/inventory.yml +++ b/ios_devices/inventory.yml @@ -1,4 +1,5 @@ -all: - hosts: - 10.11.0.1: - 10.10.254.254: \ No newline at end of file +[baguleykit] +172.16.1.254 + +[homekit] +192.168.1.60 \ No newline at end of file diff --git a/ios_devices/roles/common/vars/main.yml b/ios_devices/roles/common/vars/main.yml index 794b0a5..68f2724 100644 --- a/ios_devices/roles/common/vars/main.yml +++ b/ios_devices/roles/common/vars/main.yml @@ -1,15 +1,11 @@ $ANSIBLE_VAULT;1.1;AES256 -61643865633839356635366563643434356662313236623636616435306330393537323131626461 -3261313738323132306235663637626330636630383230340a316439653831616239316363313434 -33353630383866626461356163636261333662396332393136336137323164363236386337313937 -3162323638346662610a633865636661366530626633633065663832326234356564386438306261 -34663064373662666138343465373831373635346538346532663834363230313865653964613532 -62366462316639393932353761346638376661363936663335666366363462656566353239343361 -38346164366236643938303932633962663836633436363133636438653266643564363362313530 -36393433356662333262623664646232653437373961616632326534653131613132336331373163 -36316530646231656239346137636232386134323130333632303137356137323666373761663662 -32343739383563383431383338396333646331373431376162383536323534643539646362336339 -33373765666634633939303664613663666666303761646130326535366139656566623763653830 -37313938326231646230303630383130633139646138633335313338613239306136323830373435 -35616638643165323638393963616136666235653363383361306135366362303530393363373038 -6238353362393639353865353738643230383634383030613432 +64636537333733333534343232376661636637316432303630633938366137346563636139373566 +6136646439623465353062613638633333633833663738390a636563323032323332366162653634 +35623963363431376437346333613030313235333533663339373961393233333037326432373564 +3461613837613563380a623830373435643235333138306164343030623530313735623163376236 +30396430623866656231316661353930396634616463346564663334636236666530373963663263 +63353834643132316238666366613339366462376565306663396531356538383237326163626666 +39353036633738326462336335663331623162376635336362666664613937663865613737376432 +39663966396138393564646363643962353661636434313237353030663764376130333834643039 +65373232386136373339363564656162386537353632356535393466663039366338613530383361 +3264616163333763346636626636636631616535613939663036 diff --git a/ios_devices/test.yml b/ios_devices/test.yml new file mode 100644 index 0000000..21d1a7e --- /dev/null +++ b/ios_devices/test.yml @@ -0,0 +1,14 @@ +--- + +- name: Test playbook - reads and prints device info + hosts: baguleykit + gather_facts: false + connection: network_cli + roles: + - common + + tasks: + + - name: Run one command on device + cisco.ios.ios_command: + commands: show version \ No newline at end of file