mirror of
https://github.com/ansible-collections/community.general.git
synced 2026-05-07 05:42:50 +00: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:
committed by
Matt Martz
parent
b34d141eed
commit
847d089d6b
@@ -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
|
||||
|
||||
|
||||
Reference in New Issue
Block a user