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:
Jordan Borean 2019-02-14 03:49:13 +10:00 committed by Matt Martz
parent b34d141eed
commit 847d089d6b
6 changed files with 151 additions and 1 deletions

View 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