pytoccaz / pytoccaz.utils / 1.4.0 / module / env_info Queries environment variables on the target host | "added in version" 1.4.0 of pytoccaz.utils" Authors: Olivier Bernard (@pytoccaz)pytoccaz.utils.env_info (1.4.0) — module
Install with ansible-galaxy collection install pytoccaz.utils:==1.4.0
collections: - name: pytoccaz.utils version: 1.4.0
Queries environment variables on the target host (python os.getenv wrapper)
- name: Query for some envs pytoccaz.utils.env_info: envs: - HOME - LANG register: get_envs
envs: aliases: - get - get_envs - env_list description: 'A list of system environment variables to retrieve ' elements: str required: true type: list
result: description: A key-value dictionary with keys as variable names and their corresponding values as values returned: success sample: PATH: /usr/bin:/etc/local/bin USERNAME: olivier type: dict