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
575 B
YAML
20 lines
575 B
YAML
5 years ago
|
# 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!'"
|