1
0
Fork 0
mirror of https://github.com/ansible-collections/community.general.git synced 2024-09-14 20:13:21 +02:00

Exit admin mode properly on iosxr_config (#39594)

Fixes #38811

When using 'admin' in iosxr-config, we need to pass an end
to config terminal session but also pass exit so we exit admin
mode.
This commit is contained in:
Ricardo Carrillo Cruz 2018-05-10 10:36:37 +02:00 committed by GitHub
parent d7f3d3b867
commit 56c5567912
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -426,6 +426,8 @@ def load_config(module, command_filter, commit=False, replace=False,
elif commit: elif commit:
commit_config(module, comment=comment) commit_config(module, comment=comment)
conn.edit_config('end') conn.edit_config('end')
if admin:
conn.edit_config('exit')
else: else:
conn.discard_changes() conn.discard_changes()