add example using the "when" keyword (#41038)

* add example using the "when" keyword

<!--- Your description here -->
add example using the "when" keyword comparing group_var variable to returned value from ios_facts
+label: docsite_pr
+label: issue #311

* Update ios_config.py

* Update ios_config.py
pull/40846/merge
Chris Smolen 6 years ago committed by ansibot
parent 79cca62028
commit 3f5cf2aad4

@ -272,6 +272,16 @@ EXAMPLES = """
- shutdown
# parents: int gig1/0/11
parents: interface GigabitEthernet1/0/11
# Set boot image based on comparison to a group_var (version) and the version
# that is returned from the `ios_facts` module
- name: SETTING BOOT IMAGE
ios_config:
lines:
- no boot system
- boot system flash bootflash:{{new_image}}
host: "{{ inventory_hostname }}"
when: ansible_net_version != version
"""
RETURN = """

Loading…
Cancel
Save