I am writing a script for IOS upgrade in switches and script involves
multiple TASKS like checking copying image, settings boot statement, etc.
The final task would be to check if IOS upgrade was successful or not and
display it on screen.
Mgmt wants only the output message for the final TASK
Hi,
I am writing a script for IOS upgrade in switches and script involves
multiple TASKS like checking free space, copying image, settings boot
statement, etc.
The final task would be to check if IOS upgrade was successful or not and
display it on screen. Mgmt wants the output shown by ansible
hello Guyz
i fixit
- name: Play on switch
hosts: Paris
gather_facts: yes
tasks:
- name: set fact
ios_facts:
gather_subset: all
register: out <== [[the error was the name of my output i
named it "ansible_net_interfaces" and ansible saw it like a
dictionnary]]
hello Dick Visser
here is the debug
ok: [Paris] => {
"ansible_net_interfaces": {
"ansible_facts": {
"ansible_net_all_ipv4_addresses": [
"192.168.2.55",
"192.168.4.20",
"192.168.3.100"
],
"ansible_net_a
Hello,
As the title states, the keys themselves are variables, and I'm having
trouble getting values.
Instead of writing my question in the email body, I decided to create a
stackexchange post:
https://devops.stackexchange.com/questions/13544/ansible-jinja2-how-to-reference-json-structure-item