added test emulating #23180 use case

This commit is contained in:
Brian Coca 2017-04-12 12:59:41 -04:00 committed by Brian Coca
parent df5895e585
commit 8382ed7200

View file

@ -2,7 +2,17 @@
vars: vars:
- test1: - test1:
key1: val1 key1: val1
environment:
PATH: '{{ansible_env.PATH + ":/lola"}}'
lola: 'ido'
tasks: tasks:
- name: ensure special case with ansible_env is skipped but others still work
assert:
that:
- lookup('env', 'PATH') == ansible_env.PATH
- "'/lola' not in ansible_env.PATH"
- ansible_env.lola == 'ido'
- name: check that envvar does not exist - name: check that envvar does not exist
shell: echo $key1 shell: echo $key1
register: test_env register: test_env