znerol.become_password.command (1.0.1) — vars

Look up become password using a user specified command.

Authors: unknown

Install collection

Install with ansible-galaxy collection install znerol.become_password:==1.0.1


Add to requirements.yml

  collections:
    - name: znerol.become_password
      version: 1.0.1

Description

Looks up become password according to the inventory hostname with password manager specified by the end user.

Note that the command specified using host_command or group_command ini settings is invoked without a shell. Hence, it is treated as a path (either absolute or relative).

The first argument to the command is the inventory hostname or group name.

Inputs

    
stage:
    choices:
    - all
    - task
    - inventory
    description:
    - Control when this vars plugin may be executed.
    - Setting this option to V(all) will run the vars plugin after importing inventory
      and whenever it is demanded by a task.
    - Setting this option to V(task) will only run the vars plugin whenever it is demanded
      by a task.
    - Setting this option to V(inventory) will only run the vars plugin after parsing
      inventory.
    - If this option is omitted, the global C(RUN_VARS_PLUGINS) configuration is used
      to determine when to execute the vars plugin.
    env:
    - name: ANSIBLE_VARS_PLUGIN_STAGE
    ini:
    - key: stage
      section: znerol.become_password.command
    type: str
    version_added: '2.10'
    version_added_collection: ansible.builtin

host_command:
    description:
    - Path to command to retrieve become password for given host.
    - Must take the inventory hostname as its only argument and must write the become
      password to stdout.
    ini:
    - key: host_command
      section: znerol.become_password.command
    type: str

group_command:
    description:
    - Path to command to retrieve become password for given group.
    - Must take the group name as its only argument and must write the become password
      to stdout.
    ini:
    - key: group_command
      section: znerol.become_password.command
    type: str