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.
ansible/test/integration/targets/template/in_template_overrides.yml

29 lines
643 B
YAML

- hosts: localhost
gather_facts: false
vars:
var_a: "value"
var_b: "{{ var_a }}"
var_c: "<< var_a >>"
tasks:
- set_fact:
var_d: "{{ var_a }}"
- block:
- template:
src: in_template_overrides.j2
dest: out.txt
- command: cat out.txt
register: out
- assert:
that:
- "'var_a: value' in out.stdout"
- "'var_b: value' in out.stdout"
- "'var_c: << var_a >>' in out.stdout"
- "'var_d: value' in out.stdout"
always:
- file:
path: out.txt
state: absent