Documentation

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

Authors

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

Hint

If you notice any issues in this documentation you can edit this document to improve it.