mirror of
https://github.com/ansible-collections/community.general.git
synced 2025-06-28 03:00:23 -07:00
add ansible_executable inventory var
also handle the overrides appropriately also new executable to set shell type
This commit is contained in:
parent
14dfad730e
commit
db61e9be0c
6 changed files with 29 additions and 10 deletions
|
@ -1,4 +1,4 @@
|
|||
# (c) 2012-2014, Michael DeHaan <michael.dehaan@gmail.com>
|
||||
|
||||
# (c) 2015 Toshio Kuratomi <tkuratomi@ansible.com>
|
||||
#
|
||||
# This file is part of Ansible
|
||||
|
@ -89,7 +89,7 @@ class ConnectionBase(with_metaclass(ABCMeta, object)):
|
|||
shell_type = getattr(self, '_shell_type')
|
||||
else:
|
||||
shell_type = 'sh'
|
||||
shell_filename = os.path.basename(C.DEFAULT_EXECUTABLE)
|
||||
shell_filename = os.path.basename(self.play_context.executable)
|
||||
for shell in shell_loader.all():
|
||||
if shell_filename in shell.COMPATIBLE_SHELLS:
|
||||
shell_type = shell.SHELL_FAMILY
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue