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.
20 lines
429 B
YAML
20 lines
429 B
YAML
3 years ago
|
- hosts: localhost
|
||
|
gather_facts: false
|
||
|
vars:
|
||
|
nottemplated: this should not be seen
|
||
|
imunsafe: !unsafe '{{ nottemplated }}'
|
||
|
tasks:
|
||
|
|
||
|
- set_fact:
|
||
|
this_was_unsafe: >
|
||
|
{{ imunsafe }}
|
||
|
|
||
|
- set_fact:
|
||
|
this_always_safe: '{{ imunsafe }}'
|
||
|
|
||
|
- name: ensure nothing was templated
|
||
|
assert:
|
||
|
that:
|
||
|
- this_always_safe == imunsafe
|
||
|
- imunsafe == this_was_unsafe.strip()
|