Make ios_command example working

This commit is contained in:
Alvaro Aleman 2016-08-08 14:38:07 +02:00 committed by Matt Clay
parent 16db1d54d1
commit d9c28454ae

View file

@ -78,33 +78,34 @@ vars:
password: cisco password: cisco
transport: cli transport: cli
- name: run show version on remote devices tasks:
ios_command: - name: run show version on remote devices
commands: show version ios_command:
provider "{{ cli }}" commands: show version
provider "{{ cli }}"
- name: run show version and check to see if output contains IOS - name: run show version and check to see if output contains IOS
ios_command: ios_command:
commands: show version commands: show version
wait_for: result[0] contains IOS wait_for: result[0] contains IOS
provider "{{ cli }}" provider "{{ cli }}"
- name: run multiple commands on remote nodes - name: run multiple commands on remote nodes
ios_command: ios_command:
commands: commands:
- show version - show version
- show interfaces - show interfaces
provider "{{ cli }}" provider "{{ cli }}"
- name: run multiple commands and evaluate the output - name: run multiple commands and evaluate the output
ios_command: ios_command:
commands: commands:
- show version - show version
- show interfaces - show interfaces
wait_for: wait_for:
- result[0] contains IOS - result[0] contains IOS
- result[1] contains Loopback0 - result[1] contains Loopback0
provider "{{ cli }}" provider: "{{ cli }}"
""" """
RETURN = """ RETURN = """