Added option dual_re
Set to yes in a Dual RE scenario when 'commit sync' is enabled in the config. (set system commit synchronize)
This commit is contained in:
Родитель
0eee56f609
Коммит
2af06c6ad6
|
@ -138,6 +138,12 @@ options:
|
|||
- Provide a confirm in minutes to the commit of the configuration
|
||||
required: false
|
||||
default: None
|
||||
dual_re:
|
||||
description:
|
||||
- Set to yes in a Dual RE scenario when 'commit sync' is enabled in the config
|
||||
required: false
|
||||
default: no
|
||||
choices: ['true','false','yes','no']
|
||||
'''
|
||||
|
||||
EXAMPLES = '''
|
||||
|
@ -302,8 +308,11 @@ def _load_via_netconf(module):
|
|||
if args['confirm'] is not None:
|
||||
opts['confirm'] = args['confirm']
|
||||
|
||||
time.sleep(10)
|
||||
cu.commit(**opts)
|
||||
if args['dual_re']:
|
||||
time.sleep(10)
|
||||
cu.commit(**opts)
|
||||
else:
|
||||
cu.commit(**opts)
|
||||
|
||||
except CommitError as err:
|
||||
msg = "Unable to commit configuration: {0}".format(err)
|
||||
|
@ -404,7 +413,8 @@ def main():
|
|||
timeout=dict(required=False, default=0),
|
||||
comment=dict(required=False, default=None),
|
||||
port=dict(required=False, default=830),
|
||||
confirm=dict(required=False, default=None)
|
||||
confirm=dict(required=False, default=None),
|
||||
dual_re=dict(required=False, type='bool', choices=BOOLEANS, default=False)
|
||||
),
|
||||
supports_check_mode=True)
|
||||
|
||||
|
|
Загрузка…
Ссылка в новой задаче