ansible.builtin.runas (v2.16.5) — become

Run As user

| "added in version" 2.8 of ansible.builtin"

Authors: ansible (@core)

Install Ansible via pip

Install with pip install ansible-core==2.16.5

Description

This become plugin allows your remote/login user to execute commands as another user via the windows runas facility.

Inputs

    
become_pass:
    description: password
    env:
    - name: ANSIBLE_BECOME_PASS
    - name: ANSIBLE_RUNAS_PASS
    ini:
    - key: password
      section: runas_become_plugin
    vars:
    - name: ansible_become_password
    - name: ansible_become_pass
    - name: ansible_runas_pass

become_user:
    description: User you 'become' to execute the task
    env:
    - name: ANSIBLE_BECOME_USER
    - name: ANSIBLE_RUNAS_USER
    ini:
    - key: become_user
      section: privilege_escalation
    - key: user
      section: runas_become_plugin
    keyword:
    - name: become_user
    required: true
    vars:
    - name: ansible_become_user
    - name: ansible_runas_user

become_flags:
    default: ''
    description: Options to pass to runas, a space delimited list of k=v pairs
    env:
    - name: ANSIBLE_BECOME_FLAGS
    - name: ANSIBLE_RUNAS_FLAGS
    ini:
    - key: become_flags
      section: privilege_escalation
    - key: flags
      section: runas_become_plugin
    keyword:
    - name: become_flags
    vars:
    - name: ansible_become_flags
    - name: ansible_runas_flags