Debian Codegraph @

test/integration/targets/var_templating/vars_deprecation.yml

raw
1 - hosts: localhost
2 gather_facts: false
3 vars:
4 deprecation_message: 'The internal "vars" dictionary is deprecated'
5 tasks:
6 - shell: !unsafe ansible -m debug -a "msg='{{vars}}'" localhost
7 register: just_vars
8
9 - shell: !unsafe ansible -m debug -a 'msg="{{vars["'"ansible_python_interpreter"'"]}}"' localhost
10 register: sub_vars
11
12 - name: verify we got deprecation
13 assert:
14 that:
15 - deprecation_message in just_vars.stderr
16 - deprecation_message in sub_vars.stderr