Skip to content

Commit

Permalink
Fix invalid src option return response for network config modules (#5…
Browse files Browse the repository at this point in the history
…6076)

*  Add changed key in faliure case to maintain backward compatibility
  • Loading branch information
ganeshrn committed May 4, 2019
1 parent fa5a94a commit 1a66121
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion lib/ansible/plugins/action/network.py
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,10 @@ class ActionModule(_ActionModule):
def run(self, task_vars=None):
config_module = hasattr(self, '_config_module') and self._config_module
if config_module and self._task.args.get('src'):
self._handle_src_option()
try:
self._handle_src_option()
except AnsibleError as e:
return {'failed': True, 'msg': e.message, 'changed': False}

result = super(ActionModule, self).run(task_vars=task_vars)

Expand Down

0 comments on commit 1a66121

Please sign in to comment.