1
0
Fork 0
mirror of https://github.com/ansible-collections/community.general.git synced 2024-09-14 20:13:21 +02:00

fix nxos action plugin indentation for nxapi (#33526)

This commit is contained in:
Nathaniel Case 2017-12-04 08:18:22 -05:00 committed by Ricardo Carrillo Cruz
parent ff50b7893c
commit ce1ec4a2c9

View file

@ -74,33 +74,33 @@ class ActionModule(_ActionModule):
task_vars['ansible_socket'] = socket_path task_vars['ansible_socket'] = socket_path
else: else:
provider['transport'] = 'nxapi' provider['transport'] = 'nxapi'
if provider.get('host') is None: if provider.get('host') is None:
provider['host'] = self._play_context.remote_addr provider['host'] = self._play_context.remote_addr
if provider.get('port') is None: if provider.get('port') is None:
if provider.get('use_ssl'): if provider.get('use_ssl'):
provider['port'] = 443 provider['port'] = 443
else: else:
provider['port'] = 80 provider['port'] = 80
if provider.get('timeout') is None: if provider.get('timeout') is None:
provider['timeout'] = C.PERSISTENT_COMMAND_TIMEOUT provider['timeout'] = C.PERSISTENT_COMMAND_TIMEOUT
if provider.get('username') is None: if provider.get('username') is None:
provider['username'] = self._play_context.connection_user provider['username'] = self._play_context.connection_user
if provider.get('password') is None: if provider.get('password') is None:
provider['password'] = self._play_context.password provider['password'] = self._play_context.password
if provider.get('use_ssl') is None: if provider.get('use_ssl') is None:
provider['use_ssl'] = False provider['use_ssl'] = False
if provider.get('validate_certs') is None: if provider.get('validate_certs') is None:
provider['validate_certs'] = True provider['validate_certs'] = True
self._task.args['provider'] = provider self._task.args['provider'] = provider
if (self._play_context.connection == 'local' and transport == 'cli') or self._play_context.connection == 'network_cli': if (self._play_context.connection == 'local' and transport == 'cli') or self._play_context.connection == 'network_cli':
# make sure we are in the right cli context which should be # make sure we are in the right cli context which should be