mirror of
https://github.com/ansible-collections/community.general.git
synced 2026-05-08 14:22:46 +00:00
vyos implementation for net_interface module (#26799)
* vyos implementation for net_interface module * vyos_interface implementation module * vyos_interface integration test * net_interface integration test for vyos * Change collection to aggregate
This commit is contained in:
@@ -113,7 +113,11 @@ def load_config(module, commands, commit=False, comment=None):
|
||||
cmd = 'commit'
|
||||
if comment:
|
||||
cmd += ' comment "%s"' % comment
|
||||
exec_command(module, cmd)
|
||||
rc, out, err = exec_command(module, cmd)
|
||||
if rc != 0:
|
||||
# discard any changes in case of failure
|
||||
exec_command(module, 'exit discard')
|
||||
module.fail_json(msg='commit failed: %s' % err)
|
||||
|
||||
if not commit:
|
||||
exec_command(module, 'exit discard')
|
||||
|
||||
Reference in New Issue
Block a user