blob: 36a8ee3132513ac3cc42b8cf130d4d3026f7fe5b (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
|
# ref #18526
- name: Test that we have a proper jinja search path in template lookup
set_fact:
hello_world: "{{ lookup('template', 'hello.txt') }}"
- assert:
that:
- "hello_world|trim == 'Hello world!'"
- name: Test that we have a proper jinja search path in template lookup with different variable start and end string
vars:
my_var: world
set_fact:
hello_world_string: "{{ lookup('template', 'hello_string.txt', variable_start_string='[%', variable_end_string='%]') }}"
- assert:
that:
- "hello_world_string|trim == 'Hello world!'"
- name: Test that we have a proper jinja search path in template lookup with different comment start and end string
set_fact:
hello_world_comment: "{{ lookup('template', 'hello_comment.txt', comment_start_string='[#', comment_end_string='#]') }}"
- assert:
that:
- "hello_world_comment|trim == 'Hello world!'"
|