mirror of https://github.com/ansible/ansible.git
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.
16 lines
332 B
YAML
16 lines
332 B
YAML
5 years ago
|
- 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"
|