env – read the value of environment variables¶
Synopsis¶
Allows you to query the environment variables available on the controller when you invoked Ansible.
Parameters¶
Parameter | Choices/Defaults | Configuration | Comments |
---|---|---|---|
_terms
-
/ required
|
Environment variable or list of them to lookup the values for
|
Examples¶
- debug: msg="{{ lookup('env','HOME') }} is an environment variable"
Return Values¶
Common return values are documented here, the following are the fields unique to this lookup:
Key | Returned | Description |
---|---|---|
_list
list
|
values from the environment variables.
|
Status¶
This lookup is not guaranteed to have a backwards compatible interface. [preview]
This lookup is maintained by the Ansible Community. [community]