ansible / ansible.builtin / v2.16.5 / become / su Substitute User | "added in version" 2.8 of ansible.builtin" Authors: ansible (@core)ansible.builtin.su (v2.16.5) — become
pip
Install with pip install ansible-core==2.16.5
This become plugin allows your remote/login user to execute commands as another user via the su utility.
become_exe: default: su description: Su executable env: - name: ANSIBLE_BECOME_EXE - name: ANSIBLE_SU_EXE ini: - key: become_exe section: privilege_escalation - key: executable section: su_become_plugin keyword: - name: become_exe vars: - name: ansible_become_exe - name: ansible_su_exe become_pass: description: Password to pass to su env: - name: ANSIBLE_BECOME_PASS - name: ANSIBLE_SU_PASS ini: - key: password section: su_become_plugin required: false vars: - name: ansible_become_password - name: ansible_become_pass - name: ansible_su_pass become_user: default: root description: User you 'become' to execute the task env: - name: ANSIBLE_BECOME_USER - name: ANSIBLE_SU_USER ini: - key: become_user section: privilege_escalation - key: user section: su_become_plugin keyword: - name: become_user vars: - name: ansible_become_user - name: ansible_su_user prompt_l10n: default: [] description: - List of localized strings to match for prompt detection - If empty we'll use the built in one - Do NOT add a colon (:) to your custom entries. Ansible adds a colon at the end of each prompt; if you add another one in your string, your prompt will fail with a "Timeout" error. elements: string env: - name: ANSIBLE_SU_PROMPT_L10N ini: - key: localized_prompts section: su_become_plugin type: list vars: - name: ansible_su_prompt_l10n become_flags: default: '' description: Options to pass to su env: - name: ANSIBLE_BECOME_FLAGS - name: ANSIBLE_SU_FLAGS ini: - key: become_flags section: privilege_escalation - key: flags section: su_become_plugin keyword: - name: become_flags vars: - name: ansible_become_flags - name: ansible_su_flags