mirror of
https://github.com/ansible-collections/community.general.git
synced 2026-05-08 14:22:46 +00:00
Fix junos integration failures (#34571)
* Add connection=netconf in individual roles for modules that run using netconf connection plugin * Add connection=network_cli for junos_netconf and junos_command at applicable places
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
---
|
||||
- debug: msg="START netconf_json/bad_operator.yaml"
|
||||
- debug: msg="START netconf_json/bad_operator.yaml on connection={{ ansible_connection }}"
|
||||
|
||||
- name: test bad operator with json encoding
|
||||
junos_command:
|
||||
@@ -18,4 +18,4 @@
|
||||
- "result.failed == true"
|
||||
- "result.msg is defined"
|
||||
|
||||
- debug: msg="END netconf_json/bad_operator.yaml"
|
||||
- debug: msg="END netconf_json/bad_operator.yaml on connection={{ ansible_connection }}"
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
---
|
||||
- debug: msg="START netconf_json/contains.yaml"
|
||||
- debug: msg="START netconf_json/contains.yaml on connection={{ ansible_connection }}"
|
||||
|
||||
- name: test contains operator with json encoding
|
||||
junos_command:
|
||||
@@ -18,4 +18,4 @@
|
||||
- "result.stdout is defined"
|
||||
- "result.stdout_lines is defined"
|
||||
|
||||
- debug: msg="END netconf_json/contains.yaml"
|
||||
- debug: msg="END netconf_json/contains.yaml on connection={{ ansible_connection }}"
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
---
|
||||
- debug: msg="START netconf_json/equal.yaml"
|
||||
- debug: msg="START netconf_json/equal.yaml on connection={{ ansible_connection }}"
|
||||
|
||||
- name: test == operator with xml encoding
|
||||
junos_command:
|
||||
@@ -35,4 +35,4 @@
|
||||
- "result.stdout is defined"
|
||||
- "result.stdout_lines is defined"
|
||||
|
||||
- debug: msg="END netconf_json/equal.yaml"
|
||||
- debug: msg="END netconf_json/equal.yaml on connection={{ ansible_connection }}"
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
---
|
||||
- debug: msg="START netconf_json/greaterthan.yaml"
|
||||
- debug: msg="START netconf_json/greaterthan.yaml on connection={{ ansible_connection }}"
|
||||
|
||||
- name: test gt operator
|
||||
junos_command:
|
||||
@@ -35,4 +35,4 @@
|
||||
- "result.stdout is defined"
|
||||
- "result.stdout_lines is defined"
|
||||
|
||||
- debug: msg="END netconf_json/greaterthan.yaml"
|
||||
- debug: msg="END netconf_json/greaterthan.yaml on connection={{ ansible_connection }}"
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
---
|
||||
- debug: msg="START netconf_json/greaterthanorequal.yaml"
|
||||
- debug: msg="START netconf_json/greaterthanorequal.yaml on connection={{ ansible_connection }}"
|
||||
|
||||
- name: test ge operator
|
||||
junos_command:
|
||||
@@ -35,4 +35,4 @@
|
||||
- "result.stdout is defined"
|
||||
- "result.stdout_lines is defined"
|
||||
|
||||
- debug: msg="END netconf_json/greaterthanorequal.yaml"
|
||||
- debug: msg="END netconf_json/greaterthanorequal.yaml on connection={{ ansible_connection }}"
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
---
|
||||
- debug: msg="START netconf_json/lessthan.yaml"
|
||||
- debug: msg="START netconf_json/lessthan.yaml on connection={{ ansible_connection }}"
|
||||
|
||||
- name: test lt operator
|
||||
junos_command:
|
||||
@@ -35,4 +35,4 @@
|
||||
- "result.stdout is defined"
|
||||
- "result.stdout_lines is defined"
|
||||
|
||||
- debug: msg="END netconf_json/lessthan.yaml"
|
||||
- debug: msg="END netconf_json/lessthan.yaml on connection={{ ansible_connection }}"
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
---
|
||||
- debug: msg="START netconf_json/lessthanorequal.yaml"
|
||||
- debug: msg="START netconf_json/lessthanorequal.yaml on connection={{ ansible_connection }}"
|
||||
|
||||
- name: test le operator
|
||||
junos_command:
|
||||
@@ -35,4 +35,4 @@
|
||||
- "result.stdout is defined"
|
||||
- "result.stdout_lines is defined"
|
||||
|
||||
- debug: msg="END netconf_json/lessthanorequal.yaml"
|
||||
- debug: msg="END netconf_json/lessthanorequal.yaml on connection={{ ansible_connection }}"
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
---
|
||||
- debug: msg="START netconf_json/notequal.yaml"
|
||||
- debug: msg="START netconf_json/notequal.yaml on connection={{ ansible_connection }}"
|
||||
|
||||
- name: test neq operator
|
||||
junos_command:
|
||||
@@ -35,4 +35,4 @@
|
||||
- "result.stdout is defined"
|
||||
- "result.stdout_lines is defined"
|
||||
|
||||
- debug: msg="END netconf_json/notequal.yaml"
|
||||
- debug: msg="END netconf_json/notequal.yaml on connection={{ ansible_connection }}"
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
---
|
||||
- debug: msg="START netconf_json/output.yaml"
|
||||
- debug: msg="START netconf_json/output.yaml on connection={{ ansible_connection }}"
|
||||
|
||||
- name: get output for single command
|
||||
junos_command:
|
||||
@@ -35,6 +35,7 @@
|
||||
provider:
|
||||
transport: cli
|
||||
register: result
|
||||
connection: network_cli
|
||||
|
||||
- assert:
|
||||
that:
|
||||
@@ -51,6 +52,7 @@
|
||||
provider:
|
||||
transport: cli
|
||||
register: result
|
||||
connection: network_cli
|
||||
|
||||
- assert:
|
||||
that:
|
||||
@@ -58,4 +60,4 @@
|
||||
- "result.stdout is defined"
|
||||
- "result.stdout_lines is defined"
|
||||
|
||||
- debug: msg="END netconf_json/output.yaml"
|
||||
- debug: msg="END netconf_json/output.yaml on connection={{ ansible_connection }}"
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
---
|
||||
- debug: msg="START netconf_text/bad_operator.yaml"
|
||||
- debug: msg="START netconf_text/bad_operator.yaml on connection={{ ansible_connection }}"
|
||||
|
||||
- name: test bad operator with text encoding
|
||||
junos_command:
|
||||
@@ -18,4 +18,4 @@
|
||||
- "result.failed == true"
|
||||
- "result.msg is defined"
|
||||
|
||||
- debug: msg="END netconf_text/bad_operator.yaml"
|
||||
- debug: msg="END netconf_text/bad_operator.yaml on connection={{ ansible_connection }}"
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
---
|
||||
- debug: msg="START netconf_text/contains.yaml"
|
||||
- debug: msg="START netconf_text/contains.yaml on connection={{ ansible_connection }}"
|
||||
|
||||
- name: test contains operator with text encoding
|
||||
junos_command:
|
||||
@@ -18,4 +18,4 @@
|
||||
- "result.stdout is defined"
|
||||
- "result.stdout_lines is defined"
|
||||
|
||||
- debug: msg="END netconf_text/contains.yaml"
|
||||
- debug: msg="END netconf_text/contains.yaml on connection={{ ansible_connection }}"
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
---
|
||||
- debug: msg="START netconf_text/invalid.yaml"
|
||||
- debug: msg="START netconf_text/invalid.yaml on connection={{ ansible_connection }}"
|
||||
|
||||
- name: run invalid command
|
||||
junos_command:
|
||||
@@ -31,4 +31,4 @@
|
||||
- "result.failed == true"
|
||||
- "result.msg is defined"
|
||||
|
||||
- debug: msg="END netconf_text/invalid.yaml"
|
||||
- debug: msg="END netconf_text/invalid.yaml on connection={{ ansible_connection }}"
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
---
|
||||
- debug: msg="START netconf_text/output.yaml"
|
||||
- debug: msg="START netconf_text/output.yaml on connection={{ ansible_connection }}"
|
||||
|
||||
- name: get output for single command
|
||||
junos_command:
|
||||
@@ -59,4 +59,4 @@
|
||||
- "result.stdout is defined"
|
||||
- "result.stdout_lines is defined"
|
||||
|
||||
- debug: msg="END netconf_text/output.yaml"
|
||||
- debug: msg="END netconf_text/output.yaml on connection={{ ansible_connection }}"
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
---
|
||||
- debug: msg="START netconf_text/timeout.yaml"
|
||||
- debug: msg="START netconf_text/timeout.yaml on connection={{ ansible_connection }}"
|
||||
|
||||
- name: test bad condition
|
||||
junos_command:
|
||||
@@ -17,4 +17,4 @@
|
||||
- "result.failed == true"
|
||||
- "result.msg is defined"
|
||||
|
||||
- debug: msg="END netconf_text/timeout.yaml"
|
||||
- debug: msg="END netconf_text/timeout.yaml on connection={{ ansible_connection }}"
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
---
|
||||
- debug: msg="START netconf_xml/bad_operator.yaml"
|
||||
- debug: msg="START netconf_xml/bad_operator.yaml on connection={{ ansible_connection }}"
|
||||
|
||||
- name: test bad operator with xml encoding
|
||||
junos_command:
|
||||
@@ -18,4 +18,4 @@
|
||||
- "result.failed == true"
|
||||
- "result.msg is defined"
|
||||
|
||||
- debug: msg="END netconf_xml/bad_operator.yaml"
|
||||
- debug: msg="END netconf_xml/bad_operator.yaml on connection={{ ansible_connection }}"
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
---
|
||||
- debug: msg="START netconf_xml/contains.yaml"
|
||||
- debug: msg="START netconf_xml/contains.yaml on connection={{ ansible_connection }}"
|
||||
|
||||
- name: test contains operator with xml encoding
|
||||
junos_command:
|
||||
@@ -18,4 +18,4 @@
|
||||
- "result.stdout is defined"
|
||||
- "result.stdout_lines is defined"
|
||||
|
||||
- debug: msg="END netconf_xml/contains.yaml"
|
||||
- debug: msg="END netconf_xml/contains.yaml on connection={{ ansible_connection }}"
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
---
|
||||
- debug: msg="START netconf_xml/equal.yaml"
|
||||
- debug: msg="START netconf_xml/equal.yaml on connection={{ ansible_connection }}"
|
||||
|
||||
- name: test == operator with xml encoding
|
||||
junos_command:
|
||||
@@ -35,4 +35,4 @@
|
||||
- "result.stdout is defined"
|
||||
- "result.stdout_lines is defined"
|
||||
|
||||
- debug: msg="END netconf_xml/equal.yaml"
|
||||
- debug: msg="END netconf_xml/equal.yaml on connection={{ ansible_connection }}"
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
---
|
||||
- debug: msg="START netconf_xml/greaterthan.yaml"
|
||||
- debug: msg="START netconf_xml/greaterthan.yaml on connection={{ ansible_connection }}"
|
||||
|
||||
- name: test gt operator
|
||||
junos_command:
|
||||
@@ -35,4 +35,4 @@
|
||||
- "result.stdout is defined"
|
||||
- "result.stdout_lines is defined"
|
||||
|
||||
- debug: msg="END netconf_xml/greaterthan.yaml"
|
||||
- debug: msg="END netconf_xml/greaterthan.yaml on connection={{ ansible_connection }}"
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
---
|
||||
- debug: msg="START netconf_xml/greaterthanorequal.yaml"
|
||||
- debug: msg="START netconf_xml/greaterthanorequal.yaml on connection={{ ansible_connection }}"
|
||||
|
||||
- name: test ge operator
|
||||
junos_command:
|
||||
@@ -35,4 +35,4 @@
|
||||
- "result.stdout is defined"
|
||||
- "result.stdout_lines is defined"
|
||||
|
||||
- debug: msg="END netconf_xml/greaterthanorequal.yaml"
|
||||
- debug: msg="END netconf_xml/greaterthanorequal.yaml on connection={{ ansible_connection }}"
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
---
|
||||
- debug: msg="START netconf_xml/invalid.yaml"
|
||||
- debug: msg="START netconf_xml/invalid.yaml on connection={{ ansible_connection }}"
|
||||
|
||||
- name: run invalid command
|
||||
junos_command:
|
||||
@@ -28,4 +28,4 @@
|
||||
- "result.failed == true"
|
||||
- "result.msg is defined"
|
||||
|
||||
- debug: msg="END netconf_xml/invalid.yaml"
|
||||
- debug: msg="END netconf_xml/invalid.yaml on connection={{ ansible_connection }}"
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
---
|
||||
- debug: msg="START netconf_xml/lessthan.yaml"
|
||||
- debug: msg="START netconf_xml/lessthan.yaml on connection={{ ansible_connection }}"
|
||||
|
||||
- name: test lt operator
|
||||
junos_command:
|
||||
@@ -35,4 +35,4 @@
|
||||
- "result.stdout is defined"
|
||||
- "result.stdout_lines is defined"
|
||||
|
||||
- debug: msg="END netconf_xml/lessthan.yaml"
|
||||
- debug: msg="END netconf_xml/lessthan.yaml on connection={{ ansible_connection }}"
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
---
|
||||
- debug: msg="START netconf_xml/lessthanorequal.yaml"
|
||||
- debug: msg="START netconf_xml/lessthanorequal.yaml on connection={{ ansible_connection }}"
|
||||
|
||||
- name: test le operator
|
||||
junos_command:
|
||||
@@ -35,4 +35,4 @@
|
||||
- "result.stdout is defined"
|
||||
- "result.stdout_lines is defined"
|
||||
|
||||
- debug: msg="END netconf_xml/lessthanorequal.yaml"
|
||||
- debug: msg="END netconf_xml/lessthanorequal.yaml on connection={{ ansible_connection }}"
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
---
|
||||
- debug: msg="START netconf_xml/notequal.yaml"
|
||||
- debug: msg="START netconf_xml/notequal.yaml on connection={{ ansible_connection }}"
|
||||
|
||||
- name: test neq operator
|
||||
junos_command:
|
||||
@@ -35,4 +35,4 @@
|
||||
- "result.stdout is defined"
|
||||
- "result.stdout_lines is defined"
|
||||
|
||||
- debug: msg="END netconf_xml/notequal.yaml"
|
||||
- debug: msg="END netconf_xml/notequal.yaml on connection={{ ansible_connection }}"
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
---
|
||||
- debug: msg="START netconf_xml/output.yaml"
|
||||
- debug: msg="START netconf_xml/output.yaml on connection={{ ansible_connection }}"
|
||||
|
||||
- name: get output for single command
|
||||
junos_command:
|
||||
@@ -35,6 +35,7 @@
|
||||
provider:
|
||||
transport: cli
|
||||
register: result
|
||||
connection: network_cli
|
||||
|
||||
- assert:
|
||||
that:
|
||||
@@ -51,6 +52,7 @@
|
||||
provider:
|
||||
transport: cli
|
||||
register: result
|
||||
connection: network_cli
|
||||
|
||||
- assert:
|
||||
that:
|
||||
@@ -58,4 +60,4 @@
|
||||
- "result.stdout is defined"
|
||||
- "result.stdout_lines is defined"
|
||||
|
||||
- debug: msg="END netconf_xml/output.yaml"
|
||||
- debug: msg="END netconf_xml/output.yaml on connection={{ ansible_connection }}"
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
---
|
||||
- debug: msg="START netconf_xml/timeout.yaml"
|
||||
- debug: msg="START netconf_xml/timeout.yaml on connection={{ ansible_connection }}"
|
||||
|
||||
- name: test bad condition
|
||||
junos_command:
|
||||
@@ -16,4 +16,4 @@
|
||||
- "result.failed == true"
|
||||
- "result.msg is defined"
|
||||
|
||||
- debug: msg="END netconf_xml/timeout.yaml"
|
||||
- debug: msg="END netconf_xml/timeout.yaml on connection={{ ansible_connection }}"
|
||||
|
||||
Reference in New Issue
Block a user