Skip to content

Commit

Permalink
Fixes ansible#23388 Network provider masks too much (ansible#23418)
Browse files Browse the repository at this point in the history
* Fixes ansible#23388 Network provider masks too much

* Fix trailing whitespace
  • Loading branch information
calfonso authored Apr 7, 2017
1 parent 0cf1e8e commit d4bd54d
Show file tree
Hide file tree
Showing 14 changed files with 75 additions and 13 deletions.
2 changes: 1 addition & 1 deletion lib/ansible/module_utils/eos.py
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@
'validate_certs': dict(type='bool', default=True),
'timeout': dict(type='int'),

'provider': dict(type='dict', no_log=True),
'provider': dict(type='dict'),
'transport': dict(choices=['cli', 'eapi'])
}

Expand Down
2 changes: 1 addition & 1 deletion lib/ansible/module_utils/ios.py
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@
'authorize': dict(fallback=(env_fallback, ['ANSIBLE_NET_AUTHORIZE']), type='bool'),
'auth_pass': dict(fallback=(env_fallback, ['ANSIBLE_NET_AUTH_PASS']), no_log=True),
'timeout': dict(type='int'),
'provider': dict(type='dict', no_log=True),
'provider': dict(type='dict'),
}

def check_args(module, warnings):
Expand Down
2 changes: 1 addition & 1 deletion lib/ansible/module_utils/iosxr.py
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@
'password': dict(fallback=(env_fallback, ['ANSIBLE_NET_PASSWORD']), no_log=True),
'ssh_keyfile': dict(fallback=(env_fallback, ['ANSIBLE_NET_SSH_KEYFILE']), type='path'),
'timeout': dict(type='int'),
'provider': dict(type='dict', no_log=True)
'provider': dict(type='dict')
}

def check_args(module, warnings):
Expand Down
2 changes: 1 addition & 1 deletion lib/ansible/module_utils/junos.py
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@
'password': dict(fallback=(env_fallback, ['ANSIBLE_NET_PASSWORD']), no_log=True),
'ssh_keyfile': dict(fallback=(env_fallback, ['ANSIBLE_NET_SSH_KEYFILE']), type='path'),
'timeout': dict(type='int', default=10),
'provider': dict(type='dict', no_log=True),
'provider': dict(type='dict'),
'transport': dict()
}

Expand Down
2 changes: 1 addition & 1 deletion lib/ansible/module_utils/vyos.py
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@
'ssh_keyfile': dict(fallback=(env_fallback, ['ANSIBLE_NET_SSH_KEYFILE']), type='path'),

'timeout': dict(type='int'),
'provider': dict(type='dict', no_log=True),
'provider': dict(type='dict'),
}

def check_args(module, warnings):
Expand Down
9 changes: 8 additions & 1 deletion lib/ansible/plugins/action/dellos10.py
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,14 @@ def run(self, tmp=None, task_vars=None):
self._play_context.become = False
self._play_context.become_method = None

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

try:
del result['invocation']['module_args']['provider']
except KeyError:
pass

return result

def _get_socket_path(self, play_context):
ssh = connection_loader.get('ssh', class_only=True)
Expand Down
10 changes: 9 additions & 1 deletion lib/ansible/plugins/action/dellos6.py
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,15 @@ def run(self, tmp=None, task_vars=None):
if self._play_context.become_method == 'enable':
self._play_context.become = False
self._play_context.become_method = None
return super(ActionModule, self).run(tmp, task_vars)

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

try:
del result['invocation']['module_args']['provider']
except KeyError:
pass

return result

def _get_socket_path(self, play_context):
ssh = connection_loader.get('ssh', class_only=True)
Expand Down
9 changes: 8 additions & 1 deletion lib/ansible/plugins/action/dellos9.py
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,14 @@ def run(self, tmp=None, task_vars=None):
self._play_context.become = False
self._play_context.become_method = None

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

try:
del result['invocation']['module_args']['provider']
except KeyError:
pass

return result

def _get_socket_path(self, play_context):
ssh = connection_loader.get('ssh', class_only=True)
Expand Down
9 changes: 8 additions & 1 deletion lib/ansible/plugins/action/eos.py
Original file line number Diff line number Diff line change
Expand Up @@ -117,7 +117,14 @@ def run(self, tmp=None, task_vars=None):

self._task.args['provider'] = provider

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

try:
del result['invocation']['module_args']['provider']
except KeyError:
pass

return result

def _get_socket_path(self, play_context):
ssh = connection_loader.get('ssh', class_only=True)
Expand Down
9 changes: 8 additions & 1 deletion lib/ansible/plugins/action/ios.py
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,14 @@ def run(self, tmp=None, task_vars=None):
self._play_context.become = False
self._play_context.become_method = None

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

try:
del result['invocation']['module_args']['provider']
except KeyError:
pass

return result

def _get_socket_path(self, play_context):
ssh = connection_loader.get('ssh', class_only=True)
Expand Down
5 changes: 5 additions & 0 deletions lib/ansible/plugins/action/iosxr.py
Original file line number Diff line number Diff line change
Expand Up @@ -84,6 +84,11 @@ def run(self, tmp=None, task_vars=None):

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

try:
del result['invocation']['module_args']['provider']
except KeyError:
pass

return result

def _get_socket_path(self, play_context):
Expand Down
9 changes: 8 additions & 1 deletion lib/ansible/plugins/action/junos.py
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,14 @@ def run(self, tmp=None, task_vars=None):

task_vars['ansible_socket'] = socket_path

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

try:
del result['invocation']['module_args']['provider']
except KeyError:
pass

return result

def _get_socket_path(self, play_context):
ssh = connection_loader.get('ssh', class_only=True)
Expand Down
9 changes: 8 additions & 1 deletion lib/ansible/plugins/action/sros.py
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,14 @@ def run(self, tmp=None, task_vars=None):

task_vars['ansible_socket'] = socket_path

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

try:
del result['invocation']['module_args']['provider']
except KeyError:
pass

return result

def _get_socket_path(self, play_context):
ssh = connection_loader.get('ssh', class_only=True)
Expand Down
9 changes: 8 additions & 1 deletion lib/ansible/plugins/action/vyos.py
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,14 @@ def run(self, tmp=None, task_vars=None):

task_vars['ansible_socket'] = socket_path

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

try:
del result['invocation']['module_args']['provider']
except KeyError:
pass

return result

def _get_socket_path(self, play_context):
ssh = connection_loader.get('ssh', class_only=True)
Expand Down

0 comments on commit d4bd54d

Please sign in to comment.