diff --git a/lib/ansible/module_utils/network/iosxr/iosxr.py b/lib/ansible/module_utils/network/iosxr/iosxr.py index e37a0d8485..ed64eba456 100644 --- a/lib/ansible/module_utils/network/iosxr/iosxr.py +++ b/lib/ansible/module_utils/network/iosxr/iosxr.py @@ -426,6 +426,8 @@ def load_config(module, command_filter, commit=False, replace=False, elif commit: commit_config(module, comment=comment) conn.edit_config('end') + if admin: + conn.edit_config('exit') else: conn.discard_changes()