From 12b579f92d5c8ee0c9b707b329b256da2d27d825 Mon Sep 17 00:00:00 2001 From: Alvaro Aleman Date: Mon, 8 Aug 2016 14:38:07 +0200 Subject: [PATCH] Make ios_command example working --- network/ios/ios_command.py | 55 +++++++++++++++++++------------------- 1 file changed, 28 insertions(+), 27 deletions(-) diff --git a/network/ios/ios_command.py b/network/ios/ios_command.py index e95a817c6d2..a368ba1d9cc 100644 --- a/network/ios/ios_command.py +++ b/network/ios/ios_command.py @@ -78,33 +78,34 @@ vars: password: cisco transport: cli -- name: run show version on remote devices - ios_command: - commands: show version - provider "{{ cli }}" - -- name: run show version and check to see if output contains IOS - ios_command: - commands: show version - wait_for: result[0] contains IOS - provider "{{ cli }}" - -- name: run multiple commands on remote nodes - ios_command: - commands: - - show version - - show interfaces - provider "{{ cli }}" - -- name: run multiple commands and evaluate the output - ios_command: - commands: - - show version - - show interfaces - wait_for: - - result[0] contains IOS - - result[1] contains Loopback0 - provider "{{ cli }}" +tasks: + - name: run show version on remote devices + ios_command: + commands: show version + provider "{{ cli }}" + + - name: run show version and check to see if output contains IOS + ios_command: + commands: show version + wait_for: result[0] contains IOS + provider "{{ cli }}" + + - name: run multiple commands on remote nodes + ios_command: + commands: + - show version + - show interfaces + provider "{{ cli }}" + + - name: run multiple commands and evaluate the output + ios_command: + commands: + - show version + - show interfaces + wait_for: + - result[0] contains IOS + - result[1] contains Loopback0 + provider: "{{ cli }}" """ RETURN = """