ansible.builtin.env (v2.9.26) — lookup

read the value of environment variables

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

Authors: Jan-Piet Mens (@jpmens) <jpmens(at)gmail.com>

Install Ansible via pip

Install with pip install ansible==2.9.26

Description

Allows you to query the environment variables available on the controller when you invoked Ansible.

Usage examples

  • Success
    Steampunk Spotter scan finished with no errors, warnings or hints.
- debug: msg="{{ lookup('env','HOME') }} is an environment variable"

Inputs

    
_terms:
    description: Environment variable or list of them to lookup the values for
    required: true

Outputs

_list:
  description:
  - values from the environment variables.
  type: list