|
|
@ -155,7 +155,7 @@ from ansible.module_utils.network import NetworkModule, NetworkError
|
|
|
|
from ansible.module_utils.netcli import CommandRunner
|
|
|
|
from ansible.module_utils.netcli import CommandRunner
|
|
|
|
from ansible.module_utils.netcli import FailedConditionsError
|
|
|
|
from ansible.module_utils.netcli import FailedConditionsError
|
|
|
|
from ansible.module_utils.netcli import FailedConditionalError
|
|
|
|
from ansible.module_utils.netcli import FailedConditionalError
|
|
|
|
from ansible.module_utils.netcli import AddCommandError
|
|
|
|
from ansible.module_utils.netcli import AddCommandError, AddConditionError
|
|
|
|
|
|
|
|
|
|
|
|
VALID_KEYS = ['command', 'output', 'prompt', 'response']
|
|
|
|
VALID_KEYS = ['command', 'output', 'prompt', 'response']
|
|
|
|
|
|
|
|
|
|
|
@ -214,8 +214,12 @@ def main():
|
|
|
|
exc = get_exception()
|
|
|
|
exc = get_exception()
|
|
|
|
warnings.append('duplicate command detected: %s' % cmd)
|
|
|
|
warnings.append('duplicate command detected: %s' % cmd)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
try:
|
|
|
|
for item in conditionals:
|
|
|
|
for item in conditionals:
|
|
|
|
runner.add_conditional(item)
|
|
|
|
runner.add_conditional(item)
|
|
|
|
|
|
|
|
except AddConditionError:
|
|
|
|
|
|
|
|
exc = get_exception()
|
|
|
|
|
|
|
|
module.fail_json(msg=str(exc), condition=exc.condition)
|
|
|
|
|
|
|
|
|
|
|
|
runner.retries = module.params['retries']
|
|
|
|
runner.retries = module.params['retries']
|
|
|
|
runner.interval = module.params['interval']
|
|
|
|
runner.interval = module.params['interval']
|
|
|
|