mirror of
https://github.com/ansible-collections/community.general.git
synced 2026-05-08 14:22:46 +00:00
Add active param to junos declarative modules (#26222)
* active/deactivate configuration capability * integration test refactor
This commit is contained in:
@@ -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"
|
||||
|
||||
Reference in New Issue
Block a user