Convert value of port and timeout in provider to integer (#28732)

Fixes #28361
This commit is contained in:
Ganesh Nalawade 2017-08-29 18:40:10 +05:30 committed by GitHub
parent 4137169b21
commit a914a39975
15 changed files with 33 additions and 33 deletions

View file

@ -55,10 +55,10 @@ class ActionModule(_ActionModule):
pc.connection = 'network_cli'
pc.network_os = 'ce'
pc.remote_addr = provider['host'] or self._play_context.remote_addr
pc.port = int(provider['port']) or int(self._play_context.port) or 22
pc.port = int(provider['port'] or self._play_context.port or 22)
pc.remote_user = provider['username'] or self._play_context.connection_user
pc.password = provider['password'] or self._play_context.password
pc.timeout = provider['timeout'] or C.PERSISTENT_COMMAND_TIMEOUT
pc.timeout = int(provider['timeout'] or C.PERSISTENT_COMMAND_TIMEOUT)
self._task.args['provider'] = provider.update(
host=pc.remote_addr,
port=pc.port,