diff --git a/lib/ansible/modules/network/ios/ios_command.py b/lib/ansible/modules/network/ios/ios_command.py index 5630ecb8ae..e108e77fc3 100644 --- a/lib/ansible/modules/network/ios/ios_command.py +++ b/lib/ansible/modules/network/ios/ios_command.py @@ -35,7 +35,9 @@ description: before returning or timing out if the condition is not met. - This module does not support running commands in configuration mode. Please use M(ios_config) to configure IOS devices. -extends_documentation_fragment: ios +notes: + - Provider arguments are no longer supported. Network tasks should now + specify connection plugin network_cli instead. options: commands: description: @@ -87,33 +89,21 @@ options: """ EXAMPLES = """ -# Note: examples below use the following provider dict to handle -# transport and authentication to the node. -vars: - cli: - host: "{{ inventory_hostname }}" - username: cisco - password: cisco - transport: 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: @@ -123,7 +113,6 @@ tasks: wait_for: - result[0] contains IOS - result[1] contains Loopback0 - provider: "{{ cli }}" """ RETURN = """ @@ -132,18 +121,31 @@ stdout: returned: always type: list sample: ['...', '...'] - stdout_lines: description: The value of stdout split into a list returned: always type: list sample: [['...', '...'], ['...'], ['...']] - failed_conditions: description: The list of conditionals that have failed returned: failed type: list sample: ['...', '...'] +start: + description: The time the job started + returned: always + type: str + sample: "2016-11-16 10:38:15.126146" +end: + description: The time the job ended + returned: always + type: str + sample: "2016-11-16 10:38:25.595612" +delta: + description: The time elapsed to perform all operations + returned: always + type: str + sample: "0:00:10.469466" """ import time diff --git a/lib/ansible/modules/network/ios/ios_config.py b/lib/ansible/modules/network/ios/ios_config.py index ed4a2d8ed8..ea397b8a08 100644 --- a/lib/ansible/modules/network/ios/ios_config.py +++ b/lib/ansible/modules/network/ios/ios_config.py @@ -33,7 +33,9 @@ description: for segmenting configuration into sections. This module provides an implementation for working with IOS configuration sections in a deterministic way. -extends_documentation_fragment: ios +notes: + - Provider arguments are no longer supported. Network tasks should now + specify connection plugin network_cli instead. options: lines: description: @@ -202,6 +204,21 @@ backup_path: returned: when backup is yes type: path sample: /playbooks/ansible/backup/ios_config.2016-07-16@22:28:34 +start: + description: The time the job started + returned: always + type: str + sample: "2016-11-16 10:38:15.126146" +end: + description: The time the job ended + returned: always + type: str + sample: "2016-11-16 10:38:25.595612" +delta: + description: The time elapsed to perform all operations + returned: always + type: str + sample: "0:00:10.469466" """ import re import time