From fce737b3bbfde8eb290baa087beb209f9793a1fa Mon Sep 17 00:00:00 2001 From: Satoru SATOH Date: Mon, 9 Sep 2019 21:52:57 +0900 Subject: [PATCH] Allow junos_config changes the candidate configuration only (#61969) This allows junos_config to changes the candidate configuration only and does not commit it as the active configuration at once w/ the 'check_commit' option. (cherry picked from commit 483e76ee58f8bfb50fb51005684cc9e9c4c1a41f) --- changelogs/fragments/junos_config_check_commit.yaml | 2 ++ lib/ansible/modules/network/junos/junos_config.py | 3 ++- 2 files changed, 4 insertions(+), 1 deletion(-) create mode 100644 changelogs/fragments/junos_config_check_commit.yaml diff --git a/changelogs/fragments/junos_config_check_commit.yaml b/changelogs/fragments/junos_config_check_commit.yaml new file mode 100644 index 00000000000..92e1ce4397f --- /dev/null +++ b/changelogs/fragments/junos_config_check_commit.yaml @@ -0,0 +1,2 @@ +bugfixes: +- junos_config - allow validate config before committing to running configuration (https://github.com/ansible/ansible/pull/61969) diff --git a/lib/ansible/modules/network/junos/junos_config.py b/lib/ansible/modules/network/junos/junos_config.py index 0dac8916c3a..f6b353af6cd 100644 --- a/lib/ansible/modules/network/junos/junos_config.py +++ b/lib/ansible/modules/network/junos/junos_config.py @@ -448,7 +448,8 @@ def main(): if diff: if commit: kwargs = { - 'comment': module.params['comment'] + 'comment': module.params['comment'], + 'check': module.params['check_commit'] } confirm = module.params['confirm']