mirror of
https://github.com/ansible-collections/community.general.git
synced 2026-05-06 13:22:48 +00:00
Fix junos modules check_mode issue (#37311)
Fixes #37208 If check_mode is enabled instead of committing th config need to discard all the chnages to cnadidate db In case of cli to discard changes issue `rollback 0` command and for netconf execute `discard-changes` rpc call
This commit is contained in:
@@ -78,6 +78,20 @@
|
||||
- "result.changed == true"
|
||||
- "'<message>this is my login banner</message>' in config.xml"
|
||||
|
||||
- name: check mode
|
||||
junos_banner:
|
||||
banner: login
|
||||
text: this is not the login banner you're looking for
|
||||
state: present
|
||||
provider: "{{ netconf }}"
|
||||
register: result
|
||||
check_mode: yes
|
||||
|
||||
- assert:
|
||||
that:
|
||||
- "result.changed == true"
|
||||
- "result.failed == false"
|
||||
|
||||
- name: delete login banner
|
||||
junos_banner:
|
||||
banner: login
|
||||
|
||||
Reference in New Issue
Block a user