You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
ansible/test/integration/targets/lookup_env/tasks/main.yml

16 lines
332 B
YAML

- name: get HOME environment var value
shell: "echo $HOME"
register: home_var_value
- name: use env lookup to get HOME var
set_fact:
test_val: "{{ lookup('env', 'HOME') }}"
- debug: var=home_var_value.stdout
- debug: var=test_val
- name: compare values
assert:
that:
- "test_val == home_var_value.stdout"