mirror of
https://github.com/ansible-collections/community.general.git
synced 2025-04-24 11:21:25 -07:00
moved to base class for shell plugins
fish now sets env vars correctly fish checksum now works fixed and cleaned up imports fixed typo
This commit is contained in:
parent
f50b381dba
commit
b4b24a0889
5 changed files with 158 additions and 92 deletions
|
@ -17,9 +17,9 @@
|
|||
from __future__ import (absolute_import, division, print_function)
|
||||
__metaclass__ = type
|
||||
|
||||
from ansible.plugins.shell.sh import ShellModule as ShModule
|
||||
from ansible.plugins.shell import ShellBase
|
||||
|
||||
class ShellModule(ShModule):
|
||||
class ShellModule(ShellBase):
|
||||
|
||||
# Common shell filenames that this plugin handles
|
||||
COMPATIBLE_SHELLS = frozenset(('csh', 'tcsh'))
|
||||
|
@ -29,8 +29,12 @@ class ShellModule(ShModule):
|
|||
# How to end lines in a python script one-liner
|
||||
_SHELL_EMBEDDED_PY_EOL = '\\\n'
|
||||
_SHELL_REDIRECT_ALLNULL = '>& /dev/null'
|
||||
_SHELL_AND = '&&'
|
||||
_SHELL_OR = '||'
|
||||
_SHELL_SUB_LEFT = '"`'
|
||||
_SHELL_SUB_RIGHT = '`"'
|
||||
_SHELL_GROUP_LEFT = '('
|
||||
_SHELL_GROUP_RIGHT = ')'
|
||||
|
||||
def env_prefix(self, **kwargs):
|
||||
return 'env %s' % super(ShellModule, self).env_prefix(**kwargs)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue