mirror of
https://github.com/ansible-collections/community.general.git
synced 2025-10-22 20:13:59 -07:00
Add active param to junos declarative modules (#26222)
* active/deactivate configuration capability * integration test refactor
This commit is contained in:
parent
15e78d1073
commit
911a7e085e
13 changed files with 561 additions and 331 deletions
|
@ -15,10 +15,16 @@
|
|||
provider: "{{ netconf }}"
|
||||
register: result
|
||||
|
||||
- name: Get running configuration
|
||||
junos_rpc:
|
||||
rpc: get-configuration
|
||||
provider: "{{ netconf }}"
|
||||
register: config
|
||||
|
||||
- assert:
|
||||
that:
|
||||
- "result.changed == true"
|
||||
- "'<message>this is my login banner</message>' in result.rpc"
|
||||
- "'<message>this is my login banner</message>' in config.xml"
|
||||
|
||||
- name: Create login banner (idempotent)
|
||||
net_banner:
|
||||
|
@ -39,10 +45,16 @@
|
|||
provider: "{{ netconf }}"
|
||||
register: result
|
||||
|
||||
- name: Get running configuration
|
||||
junos_rpc:
|
||||
rpc: get-configuration
|
||||
provider: "{{ netconf }}"
|
||||
register: config
|
||||
|
||||
- assert:
|
||||
that:
|
||||
- "result.changed == true"
|
||||
- "'<message delete=\"delete\" />' in result.rpc"
|
||||
- "'<message>this is my login banner</message>' not in config.xml"
|
||||
|
||||
- name: setup - remove motd banner
|
||||
net_banner:
|
||||
|
@ -58,13 +70,16 @@
|
|||
provider: "{{ netconf }}"
|
||||
register: result
|
||||
|
||||
- debug:
|
||||
msg: "{{ result }}"
|
||||
- name: Get running configuration
|
||||
junos_rpc:
|
||||
rpc: get-configuration
|
||||
provider: "{{ netconf }}"
|
||||
register: config
|
||||
|
||||
- assert:
|
||||
that:
|
||||
- "result.changed == true"
|
||||
- "'<announcement>this is my motd banner</announcement>' in result.rpc"
|
||||
- "'<announcement>this is my motd banner</announcement>' in config.xml"
|
||||
|
||||
- name: Create motd banner (idempotent)
|
||||
net_banner:
|
||||
|
@ -85,7 +100,13 @@
|
|||
provider: "{{ netconf }}"
|
||||
register: result
|
||||
|
||||
- name: Get running configuration
|
||||
junos_rpc:
|
||||
rpc: get-configuration
|
||||
provider: "{{ netconf }}"
|
||||
register: config
|
||||
|
||||
- assert:
|
||||
that:
|
||||
- "result.changed == true"
|
||||
- "'<announcement delete=\"delete\" />' in result.rpc"
|
||||
- "'<announcement>this is my motd banner</announcement>' not in config.xml"
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue