ansible.plugins.shell package

class ansible.plugins.shell.ShellBase[source]

Bases: object

env_prefix(**kwargs)[source]
join_path(*args)[source]
get_remote_filename(pathname)[source]
path_has_trailing_slash(path)[source]
chmod(mode, path, recursive=True)[source]
chown(path, user, group=None, recursive=True)[source]
set_user_facl(path, user, mode, recursive=True)[source]

Only sets acls for users as that’s really all we need

remove(path, recurse=False)[source]
exists(path)[source]
mkdtemp(basefile=None, system=False, mode=None)[source]
expand_user(user_home_path)[source]

Return a command to expand tildes in a path.

It can be either “~” or “~username”. We use the POSIX definition of a username:

http://pubs.opengroup.org/onlinepubs/000095399/basedefs/xbd_chap03.html#tag_03_426
http://pubs.opengroup.org/onlinepubs/000095399/basedefs/xbd_chap03.html#tag_03_276
build_module_command(env_string, shebang, cmd, arg_path=None, rm_tmp=None)[source]
append_command(cmd, cmd_to_append)[source]

Append an additional command if supported by the shell

Submodules

ansible.plugins.shell.csh module

class ansible.plugins.shell.csh.ShellModule[source]

Bases: ansible.plugins.shell.ShellBase

COMPATIBLE_SHELLS = frozenset(['csh', 'tcsh'])
SHELL_FAMILY = 'csh'
env_prefix(**kwargs)[source]

ansible.plugins.shell.fish module

class ansible.plugins.shell.fish.ShellModule[source]

Bases: ansible.plugins.shell.sh.ShellModule

COMPATIBLE_SHELLS = frozenset(['fish'])
SHELL_FAMILY = 'fish'
env_prefix(**kwargs)[source]
build_module_command(env_string, shebang, cmd, arg_path=None, rm_tmp=None)[source]
checksum(path, python_interp)[source]

ansible.plugins.shell.powershell module

class ansible.plugins.shell.powershell.ShellModule[source]

Bases: object

COMPATIBLE_SHELLS = frozenset([])
SHELL_FAMILY = 'powershell'
env_prefix(**kwargs)[source]
join_path(*args)[source]
get_remote_filename(pathname)[source]
path_has_trailing_slash(path)[source]
chmod(mode, path, recursive=True)[source]
chown(path, user, group=None, recursive=True)[source]
set_user_facl(path, user, mode, recursive=True)[source]
remove(path, recurse=False)[source]
mkdtemp(basefile, system=False, mode=None)[source]
expand_user(user_home_path)[source]
exists(path)[source]
checksum(path, *args, **kwargs)[source]
build_module_command(env_string, shebang, cmd, arg_path=None, rm_tmp=None)[source]

ansible.plugins.shell.sh module

class ansible.plugins.shell.sh.ShellModule[source]

Bases: ansible.plugins.shell.ShellBase

COMPATIBLE_SHELLS = frozenset(['dash', 'sh', 'zsh', 'ksh', 'bash'])
SHELL_FAMILY = 'sh'
checksum(path, python_interp)[source]