mirror of
https://github.com/ansible-collections/community.general.git
synced 2025-05-04 16:21:28 -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
19
test/integration/targets/shell/action_plugins/test_shell.py
Normal file
19
test/integration/targets/shell/action_plugins/test_shell.py
Normal file
|
@ -0,0 +1,19 @@
|
|||
# This file is part of Ansible
|
||||
|
||||
# Copyright (c) 2019 Ansible Project
|
||||
# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt)
|
||||
|
||||
# Make coding more python3-ish
|
||||
from __future__ import (absolute_import, division, print_function)
|
||||
__metaclass__ = type
|
||||
|
||||
from ansible.plugins.action import ActionBase
|
||||
|
||||
|
||||
class ActionModule(ActionBase):
|
||||
|
||||
def run(self, tmp=None, task_vars=None):
|
||||
result = super(ActionModule, self).run(tmp, task_vars)
|
||||
del tmp # tmp no longer has any effect
|
||||
result['shell'] = self._connection._shell.SHELL_FAMILY
|
||||
return result
|
Loading…
Add table
Add a link
Reference in a new issue