sudo¶
Collection Note
This module is part of the ansible.builtin collection. To install the collection, use:
Added in version2.8.
Synopsis¶
- This become plugin allows your remote/login user to execute commands as another user via the sudo utility.
Parameters¶
| Parameter | Defaults / Choices | Comments |
|---|---|---|
| become_exe | Default: sudo |
Sudo executable Env: ANSIBLE_BECOME_EXE Env: ANSIBLE_SUDO_EXE |
| become_flags | Default: -H -S -n |
Options to pass to sudo Env: ANSIBLE_BECOME_FLAGS Env: ANSIBLE_SUDO_FLAGS |
| become_pass | Password to pass to sudo Env: ANSIBLE_BECOME_PASS Env: ANSIBLE_SUDO_PASS |
|
| become_user | Default: root |
User you 'become' to execute the task Env: ANSIBLE_BECOME_USER Env: ANSIBLE_SUDO_USER |
| sudo_chdir string |
Directory to change to before invoking sudo; can avoid permission errors when dropping privileges. Env: ANSIBLE_SUDO_CHDIR Version Added: 2.19 |
Authors¶
- Ansible (@core)