mirror of
https://github.com/ansible-collections/community.general.git
synced 2025-07-23 05:10:22 -07: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:
parent
5e6b2495c0
commit
1c8c51d05c
69 changed files with 276 additions and 123 deletions
|
@ -8,8 +8,14 @@
|
|||
- name: set test_items
|
||||
set_fact: test_items="{{ test_cases.files | map(attribute='path') | list }}"
|
||||
|
||||
- name: run test case
|
||||
include: "{{ test_case_to_run }}"
|
||||
- name: run test case (connection=netconf)
|
||||
include: "{{ test_case_to_run }} ansible_connection=netconf"
|
||||
with_items: "{{ test_items }}"
|
||||
loop_control:
|
||||
loop_var: test_case_to_run
|
||||
|
||||
- name: run test case (connection=local)
|
||||
include: "{{ test_case_to_run }} ansible_connection=local"
|
||||
with_items: "{{ test_items }}"
|
||||
loop_control:
|
||||
loop_var: test_case_to_run
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
---
|
||||
- debug: msg="START netconf/backup.yaml"
|
||||
- debug: msg="START netconf/backup.yaml on connection={{ ansible_connection }}"
|
||||
|
||||
- name: setup
|
||||
junos_config:
|
||||
|
@ -44,4 +44,4 @@
|
|||
that:
|
||||
- "backup_files.files is defined"
|
||||
|
||||
- debug: msg="END netconf/backup.yaml"
|
||||
- debug: msg="END netconf/backup.yaml on connection={{ ansible_connection }}"
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
---
|
||||
- debug: msg="START netconf/bad_action.yaml"
|
||||
- debug: msg="START netconf/bad_action.yaml on connection={{ ansible_connection }}"
|
||||
|
||||
- name: configure single bad_action command
|
||||
junos_config:
|
||||
|
@ -13,4 +13,4 @@
|
|||
that:
|
||||
- "result.failed == true"
|
||||
|
||||
- debug: msg="END netconf/bad_action.yaml"
|
||||
- debug: msg="END netconf/bad_action.yaml on connection={{ ansible_connection }}"
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
---
|
||||
- debug: msg="START netconf/invalid.yaml"
|
||||
- debug: msg="START netconf/invalid.yaml on connection={{ ansible_connection }}"
|
||||
|
||||
- name: configure single invalid command
|
||||
junos_config:
|
||||
|
@ -26,4 +26,4 @@
|
|||
that:
|
||||
- "result.failed == true"
|
||||
|
||||
- debug: msg="END netconf/invalid.yaml"
|
||||
- debug: msg="END netconf/invalid.yaml on connection={{ ansible_connection }}"
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
---
|
||||
- debug: msg="START netconf/multiple.yaml"
|
||||
- debug: msg="START netconf/multiple.yaml on connection={{ ansible_connection }}"
|
||||
|
||||
- name: setup
|
||||
junos_config:
|
||||
|
@ -46,4 +46,4 @@
|
|||
provider: "{{ netconf }}"
|
||||
register: test
|
||||
|
||||
- debug: msg="END netconf/multiple.yaml"
|
||||
- debug: msg="END netconf/multiple.yaml on connection={{ ansible_connection }}"
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
---
|
||||
- debug: msg="START netconf/single.yaml"
|
||||
- debug: msg="START netconf/single.yaml on connection={{ ansible_connection }}"
|
||||
|
||||
# Ensure that when we change the hostname to `localhost` we cause a change
|
||||
- name: setup
|
||||
|
@ -79,4 +79,4 @@
|
|||
provider: "{{ netconf }}"
|
||||
|
||||
|
||||
- debug: msg="END netconf/single.yaml"
|
||||
- debug: msg="END netconf/single.yaml on connection={{ ansible_connection }}"
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
---
|
||||
- debug: msg="START netconf/src_basic.yaml"
|
||||
- debug: msg="START netconf/src_basic.yaml on connection={{ ansible_connection }}"
|
||||
|
||||
- name: setup
|
||||
junos_config:
|
||||
|
@ -101,4 +101,4 @@
|
|||
that:
|
||||
- "result.changed == true"
|
||||
|
||||
- debug: msg="END netconf/src_basic.yaml"
|
||||
- debug: msg="END netconf/src_basic.yaml on connection={{ ansible_connection }}"
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
---
|
||||
- debug: msg="START netconf/src_invalid.yaml"
|
||||
- debug: msg="START netconf/src_invalid.yaml on connection={{ ansible_connection }}"
|
||||
|
||||
|
||||
# Defend https://github.com/ansible/ansible-modules-core/issues/4797
|
||||
|
@ -16,4 +16,4 @@
|
|||
- "result.failed == true"
|
||||
- "result.msg == 'path specified in src not found'"
|
||||
|
||||
- debug: msg="END netconf/src_invalid.yaml"
|
||||
- debug: msg="END netconf/src_invalid.yaml on connection={{ ansible_connection }}"
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue