mirror of
https://github.com/ansible-collections/community.general.git
synced 2025-07-02 14:40:19 -07:00
Re-add support for setting shell from play context (#52139)
* Re-add support for setting shell from play context * Add integration tests * Add more tests for shell override * fix sanity issue
This commit is contained in:
parent
b34d141eed
commit
847d089d6b
6 changed files with 151 additions and 1 deletions
|
@ -83,7 +83,8 @@ class ConnectionBase(AnsiblePlugin):
|
|||
|
||||
# we always must have shell
|
||||
if not self._shell:
|
||||
self._shell = get_shell_plugin(shell_type=getattr(self, '_shell_type', None), executable=self._play_context.executable)
|
||||
shell_type = play_context.shell if play_context.shell else getattr(self, '_shell_type', None)
|
||||
self._shell = get_shell_plugin(shell_type=shell_type, executable=self._play_context.executable)
|
||||
|
||||
self.become = None
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue