mirror of
https://github.com/ansible-collections/community.general.git
synced 2025-07-22 21:00:22 -07:00
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
This commit is contained in:
parent
79cca62028
commit
3f5cf2aad4
1 changed files with 10 additions and 0 deletions
|
@ -272,6 +272,16 @@ EXAMPLES = """
|
||||||
- shutdown
|
- shutdown
|
||||||
# parents: int gig1/0/11
|
# parents: int gig1/0/11
|
||||||
parents: interface GigabitEthernet1/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 = """
|
RETURN = """
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue