summaryrefslogtreecommitdiff
path: root/test/integration/targets/template/unsafe.yml
blob: 6746e1ea0ca223fcad058d5b32fd8d1d77c8bb0f (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
- 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()