Removing provider from facts, command and config (#54623)

This commit is contained in:
Anil Kumar Muraleedharan
2019-04-06 07:20:29 +05:30
committed by Nathaniel Case
parent 4b3662605d
commit c2958df3a4
18 changed files with 13 additions and 243 deletions

View File

@@ -34,7 +34,7 @@ These are the various options the customer have in executing the cnos_command mo
Variable | Description
--- | ---
`commands` | List of commands to send to the remote device over the configured provider. The resulting output from the command is returned. If the I(wait_for) argument is provided, the module is not returned until the condition is satisfied or the number of retires as expired.
`commands` | List of commands to send to the remote device. The resulting output from the command is returned. If the I(wait_for) argument is provided, the module is not returned until the condition is satisfied or the number of retires as expired.
`wait_for` | List of conditions to evaluate against the output of the command. The task will wait for each condition to be true before moving forward. If the conditional is not true within the configured number of retries, the task fails. See examples.
`match` | The I(match) argument is used in conjunction with the I(wait_for) argument to specify the match policy. Valid values are C(all) or C(any). If the value is set to C(all) then all conditionals in the wait_for must be satisfied. If the value is set to C(any) then only one of the values must be satisfied.
`retries` | Specifies the number of retries a command should by tried before it is considered failed. The command is run on the target device every retry and evaluated against the I(wait_for) conditions.

View File

@@ -8,7 +8,6 @@
- display interface brief
wait_for:
- result[0] contains 'Description: Foo'
provider: "{{ cli }}"
register: result
ignore_errors: yes

View File

@@ -9,7 +9,6 @@
wait_for:
- "result[0] contains 'Lenovo'"
- "result[1] contains 'Mem:'"
provider: "{{ cli }}"
register: result
- assert:

View File

@@ -4,7 +4,6 @@
- name: run invalid command
cnos_command:
commands: ['display foo']
provider: "{{ cli }}"
register: result
ignore_errors: yes
@@ -17,7 +16,6 @@
commands:
- display version
- display foo
provider: "{{ cli }}"
register: result
ignore_errors: yes

View File

@@ -4,7 +4,6 @@
- name: get output for single command
cnos_command:
commands: ['display version']
provider: "{{ cli }}"
register: result
- assert:
@@ -17,7 +16,6 @@
commands:
- display version
- display interface brief
provider: "{{ cli }}"
register: result
- assert:

View File

@@ -7,7 +7,6 @@
- display version
wait_for:
- "result[0] contains bad_value_string"
provider: "{{ cli }}"
register: result
ignore_errors: yes

View File

@@ -1,10 +0,0 @@
---
cli:
host: "{{ inventory_hostname }}"
port: 22
username: admin
password: admin
# transport: cli
timeout: 30
authorize: True
auth_pass: