From 2822744c685e43249df5791e21e92692520072bb Mon Sep 17 00:00:00 2001 From: Ganesh Nalawade Date: Wed, 13 Nov 2019 01:14:56 +0530 Subject: [PATCH] dest lives in 4 different places depending on exeuction type (#62444) (#63283) (cherry picked from commit d4ad541eee90e951b47165120cd3edc932177c57) --- changelogs/fragments/network_backup_option_fix.yaml | 2 ++ lib/ansible/plugins/action/network.py | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-) create mode 100644 changelogs/fragments/network_backup_option_fix.yaml diff --git a/changelogs/fragments/network_backup_option_fix.yaml b/changelogs/fragments/network_backup_option_fix.yaml new file mode 100644 index 00000000000..61423345dde --- /dev/null +++ b/changelogs/fragments/network_backup_option_fix.yaml @@ -0,0 +1,2 @@ +bugfixes: +- Fix for backup option dest key for network modules (https://github.com/ansible/ansible/issues/57131). diff --git a/lib/ansible/plugins/action/network.py b/lib/ansible/plugins/action/network.py index 277dc708954..f0d0ca3ba70 100644 --- a/lib/ansible/plugins/action/network.py +++ b/lib/ansible/plugins/action/network.py @@ -103,7 +103,7 @@ class ActionModule(_ActionModule): result['msg'] = copy_result.get('msg') return - result['backup_path'] = copy_result['dest'] + result['backup_path'] = dest if copy_result.get('changed', False): result['changed'] = copy_result['changed']