Skip to content

sudo

Collection Note

This module is part of the ansible.builtin collection. To install the collection, use:

ansible-galaxy collection install ansible.builtin
Added in version 2.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

Authors

  • Ansible (@core)