ansible/test/integration/targets/shell/action_plugins/test_shell.py
Jordan Borean 847d089d6b 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
2019-02-13 11:49:13 -06:00

19 lines
605 B
Python

# 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