ansible.builtin.sh shell – POSIX shell (/bin/sh)
Note
This shell plugin is part of ansible-core
and included in all Ansible installations. In most cases, you can use the short plugin name sh
. However, we recommend you use the Fully Qualified Collection Name (FQCN) ansible.builtin.sh
for easy linking to the plugin documentation and to avoid conflicting with other collections that may have the same shell plugin name.
Synopsis
- This shell plugin is the one you want to use on most Unix systems, it is the most compatible and widely installed shell.
Parameters
Parameter | Comments |
---|---|
admin_users list / elements=string | list of users to be expected to have admin privileges. This is used by the controller to determine how to share temporary files between the remote user and the become user. Default: Configuration:
|
async_dir string | Directory in which ansible will keep async job information Default: Configuration:
|
common_remote_group string added in ansible-base 2.10 | Checked when Ansible needs to execute a module as a different user. If setfacl and chown both fail and do not let the different user access the module’s files, they will be chgrp’d to this group. In order for this to work, the remote_user and become_user must share a common group and this setting must be set to that group. Configuration:
|
environment list / elements=dictionary | List of dictionaries of environment variables and their values to use when executing commands. Default: |
remote_tmp string | Temporary directory to use on targets when executing tasks. Default: Configuration:
|
system_tmpdirs list / elements=string | List of valid system temporary directories on the managed machine for Ansible to validate When Default: Configuration:
|
world_readable_temp boolean added in ansible-base 2.10 | This makes the temporary files created on the machine world-readable and will issue a warning instead of failing the task. It is useful when becoming an unprivileged user. Choices:
Configuration:
|
Hint
Configuration entries for each entry type have a low to high priority order. For example, a variable that is lower in the list will override a variable that is higher up.
Collection links
© 2012–2018 Michael DeHaan
© 2018–2024 Red Hat, Inc.
Licensed under the GNU General Public License version 3.
https://docs.ansible.com/ansible/latest/collections/ansible/builtin/sh_shell.html