mirror of
https://github.com/ansible-collections/community.general.git
synced 2025-10-04 23:44:00 -07:00
Unhardcode the port and protocol on eos EAPI (#23350)
We were hard-coding the protocol, port and validate_certs on eos EAPI via the action plugin. Put defaults on the eos_argument_spec and pull those values from it.
This commit is contained in:
parent
5f4673b5ae
commit
3537b24742
2 changed files with 11 additions and 14 deletions
|
@ -95,7 +95,7 @@ class ActionModule(_ActionModule):
|
|||
provider['host'] = self._play_context.remote_addr
|
||||
|
||||
if provider.get('port') is None:
|
||||
provider['port'] = 443
|
||||
provider['port'] = eos_argument_spec['port']['default']
|
||||
|
||||
if provider.get('timeout') is None:
|
||||
provider['timeout'] = self._play_context.timeout
|
||||
|
@ -110,10 +110,10 @@ class ActionModule(_ActionModule):
|
|||
provider['authorize'] = False
|
||||
|
||||
if provider.get('use_ssl') is None:
|
||||
provider['use_ssl'] = True
|
||||
provider['use_ssl'] = eos_argument_spec['use_ssl']['default']
|
||||
|
||||
if provider.get('validate_certs') is None:
|
||||
provider['validate_certs'] = True
|
||||
provider['validate_certs'] = eos_argument_spec['validate_certs']['default']
|
||||
|
||||
self._task.args['provider'] = provider
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue