mirror of
https://github.com/ansible-collections/ansible.posix.git
synced 2026-03-07 18:15:20 +01:00
Merge f059a74d44 into 692b906b82
This commit is contained in:
commit
6b99f14049
8 changed files with 14 additions and 11 deletions
|
|
@ -17,8 +17,6 @@
|
|||
from __future__ import (absolute_import, division, print_function)
|
||||
__metaclass__ = type
|
||||
|
||||
import os.path
|
||||
|
||||
from ansible import constants as C
|
||||
from ansible.module_utils.six import string_types
|
||||
from ansible.module_utils.six.moves import shlex_quote
|
||||
|
|
@ -301,8 +299,6 @@ class ActionModule(ActionBase):
|
|||
break
|
||||
if localhost_shell:
|
||||
break
|
||||
else:
|
||||
localhost_shell = os.path.basename(C.DEFAULT_EXECUTABLE)
|
||||
self._play_context.shell = localhost_shell
|
||||
|
||||
# Unlike port, there can be only one executable
|
||||
|
|
|
|||
|
|
@ -11,7 +11,8 @@ hostvars:
|
|||
asserts:
|
||||
- hasattr(SAM._connection, 'ismock')
|
||||
- SAM._connection.transport == 'local'
|
||||
- self._play_context.shell == 'sh'
|
||||
- self._play_context.shell == None
|
||||
- self._play_context.executable == '/bin/sh'
|
||||
- self.execute_called
|
||||
- self.final_module_args['_local_rsync_path'] == 'rsync'
|
||||
- self.final_module_args['src'] == '/tmp/deleteme'
|
||||
|
|
|
|||
|
|
@ -32,7 +32,8 @@ asserts:
|
|||
- self.final_module_args['dest'] == 'root@el6host:/tmp/deleteme'
|
||||
- self.task.become == True
|
||||
- self.task.become_user == None
|
||||
- self._play_context.shell == 'sh'
|
||||
- self._play_context.shell == None
|
||||
- self._play_context.executable == '/bin/sh'
|
||||
- self._play_context.remote_addr == 'el6host'
|
||||
- self._play_context.remote_user == 'root'
|
||||
- self._play_context.become == False
|
||||
|
|
|
|||
|
|
@ -32,7 +32,8 @@ asserts:
|
|||
- self.final_module_args['dest'] == 'root@el6host:/tmp/deleteme'
|
||||
- self.task.become == None
|
||||
- self.task.become_user == None
|
||||
- self._play_context.shell == 'sh'
|
||||
- self._play_context.shell == None
|
||||
- self._play_context.executable == '/bin/sh'
|
||||
- self._play_context.remote_addr == 'el6host'
|
||||
- self._play_context.remote_user == 'root'
|
||||
- self._play_context.become == False
|
||||
|
|
|
|||
|
|
@ -22,7 +22,8 @@ asserts:
|
|||
- self.final_module_args['dest_port'] == 2202
|
||||
- self.final_module_args['src'] == '/tmp/deleteme'
|
||||
- self.final_module_args['dest'] == 'vagrant@127.0.0.1:/tmp/deleteme'
|
||||
- self._play_context.shell == 'sh'
|
||||
- self._play_context.shell == None
|
||||
- self._play_context.executable == '/bin/sh'
|
||||
- self._play_context.remote_addr == '127.0.0.1'
|
||||
- self._play_context.remote_user == 'vagrant'
|
||||
- self._play_context.become == False
|
||||
|
|
|
|||
|
|
@ -25,7 +25,8 @@ asserts:
|
|||
- self.final_module_args['dest_port'] == 2202
|
||||
- self.final_module_args['src'] == '/tmp/deleteme'
|
||||
- self.final_module_args['dest'] == 'vagrant@127.0.0.1:/tmp/deleteme'
|
||||
- self._play_context.shell == 'sh'
|
||||
- self._play_context.shell == None
|
||||
- self._play_context.executable == '/bin/sh'
|
||||
- self._play_context.remote_addr == '127.0.0.1'
|
||||
- self._play_context.remote_user == 'vagrant'
|
||||
- self._play_context.become == False
|
||||
|
|
|
|||
|
|
@ -22,7 +22,8 @@ asserts:
|
|||
- self.final_module_args['dest_port'] == 2202
|
||||
- self.final_module_args['src'] == '/tmp/deleteme'
|
||||
- self.final_module_args['dest'] == 'vagrant@127.0.0.1:/tmp/deleteme'
|
||||
- self._play_context.shell == 'sh'
|
||||
- self._play_context.shell == None
|
||||
- self._play_context.executable == '/bin/sh'
|
||||
- self._play_context.remote_addr == '127.0.0.1'
|
||||
- self._play_context.remote_user == 'vagrant'
|
||||
- self._play_context.become == False
|
||||
|
|
|
|||
|
|
@ -18,7 +18,8 @@ task_args:
|
|||
asserts:
|
||||
- hasattr(SAM._connection, 'ismock')
|
||||
- SAM._connection.transport == 'local'
|
||||
- self._play_context.shell == 'sh'
|
||||
- self._play_context.shell == None
|
||||
- self._play_context.executable == '/bin/sh'
|
||||
- self.execute_called
|
||||
- self.final_module_args['_local_rsync_path'] == 'rsync'
|
||||
- self.final_module_args['src'] == '/tmp/deleteme'
|
||||
|
|
|
|||
Loading…
Reference in a new issue