Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- $ cat main.yml
- ---
- - name: playbook1
- hosts: localhost
- vars:
- test_var:
- foo: 1
- bar: 2
- baz: "ligne quoted and with \r\n"
- tasks:
- - template:
- src: test.yml.j2
- dest: "{{ playbook_dir }}/test_1.yml"
- ...
- $ cat templates/test.yml.j2
- ---
- {% for k in test_var.keys() %}
- {{ k }}: {{ test_var[k] }}
- {% endfor %}
- ...
- $ cat test_1.yml
- ---
- bar: 2
- foo: 1
- baz: ligne quoted and with
- ...
- Expected:
- $ cat test_1.yml
- ---
- bar: 2
- foo: 1
- baz: "ligne quoted and with \r\n"
- ...
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement