mirror of
https://github.com/ansible-collections/community.general.git
synced 2025-04-25 03:41:25 -07: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:
parent
a1977d9654
commit
751ad7021c
10 changed files with 733 additions and 1 deletions
|
@ -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')
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue