@ -86,19 +86,33 @@ class ActionModule(_ActionModule):
task_vars [ ' ansible_socket ' ] = socket_path
task_vars [ ' ansible_socket ' ] = socket_path
else :
else :
provider_arg = {
provider [ ' transport ' ] = ' eapi '
' transport ' : ' eapi ' ,
' host ' : provider . get ( ' host ' ) or self . _play_context . remote_addr ,
if provider . get ( ' host ' ) is None :
' port ' : provider . get ( ' port ' ) ,
provider [ ' host ' ] = self . _play_context . remote_addr
' username ' : provider . get ( ' username ' ) or self . _play_context . connection_user ,
' password ' : provider . get ( ' password ' ) or self . _play_context . password ,
if provider . get ( ' port ' ) is None :
' authorize ' : provider . get ( ' authorize ' ) or False ,
provider [ ' port ' ] = 443
' auth_pass ' : provider . get ( ' auth_pass ' ) ,
' timeout ' : provider . get ( ' timeout ' ) or self . _play_context . timeout ,
if provider . get ( ' timeout ' ) is None :
' use_ssl ' : task_vars . get ( ' eapi_use_ssl ' ) or False ,
provider [ ' timeout ' ] = self . _play_context . timeout
' validate_certs ' : task_vars . get ( ' eapi_validate_certs ' ) or True
}
if provider . get ( ' username ' ) is None :
self . _task . args [ ' provider ' ] = provider_arg
provider [ ' username ' ] = self . _play_context . connection_user
if provider . get ( ' password ' ) is None :
provider [ ' password ' ] = self . _play_context . password
if provider . get ( ' authorize ' ) is None :
provider [ ' authorize ' ] = False
if provider . get ( ' use_ssl ' ) is None :
provider [ ' use_ssl ' ] = True
if provider . get ( ' validate_certs ' ) is None :
provider [ ' validate_certs ' ] = True
self . _task . args [ ' provider ' ] = provider
if self . _play_context . become_method == ' enable ' :
if self . _play_context . become_method == ' enable ' :
self . _play_context . become = False
self . _play_context . become = False