Created
May 27, 2019 10:03
-
-
Save JanKoppe/2ea9751f847867df06edd8babbe3fe8b to your computer and use it in GitHub Desktop.
Ansible Templating issue
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
test: | |
multiline: | | |
f4x6aaBtLPQk898Ymfkn | |
TQsi69wDY40aluFbdp99 | |
jqdGOkx9CN2xgWOM8JeI | |
M4lXnXyctLTDejDb2eZu | |
XBPmvqXJStQFZIQwHzLF | |
by0cxOYjrY3On6hj3oqk | |
Xu0Ze6Sz8EbC7udHsyxE | |
jNv0M7lWNJCfegOlDCJH | |
UK56XrCbPj6HD4HfwT57 | |
dtwpXGkWMjhpe3UcMJJ8 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[all] | |
localhost |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
- hosts: all | |
tasks: | |
- name: test templating | |
delegate_to: localhost | |
template: | |
src: template.yaml.j2 | |
dest: "{{ playbook_dir }}/template.yaml" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
multiline: 'f4x6aaBtLPQk898Ymfkn | |
TQsi69wDY40aluFbdp99 | |
jqdGOkx9CN2xgWOM8JeI | |
M4lXnXyctLTDejDb2eZu | |
XBPmvqXJStQFZIQwHzLF | |
by0cxOYjrY3On6hj3oqk | |
Xu0Ze6Sz8EbC7udHsyxE | |
jNv0M7lWNJCfegOlDCJH | |
UK56XrCbPj6HD4HfwT57 | |
dtwpXGkWMjhpe3UcMJJ8 | |
' | |
{multiline: 'f4x6aaBtLPQk898Ymfkn | |
TQsi69wDY40aluFbdp99 | |
jqdGOkx9CN2xgWOM8JeI | |
M4lXnXyctLTDejDb2eZu | |
XBPmvqXJStQFZIQwHzLF | |
by0cxOYjrY3On6hj3oqk | |
Xu0Ze6Sz8EbC7udHsyxE | |
jNv0M7lWNJCfegOlDCJH | |
UK56XrCbPj6HD4HfwT57 | |
dtwpXGkWMjhpe3UcMJJ8 | |
'} | |
f4x6aaBtLPQk898Ymfkn | |
TQsi69wDY40aluFbdp99 | |
jqdGOkx9CN2xgWOM8JeI | |
M4lXnXyctLTDejDb2eZu | |
XBPmvqXJStQFZIQwHzLF | |
by0cxOYjrY3On6hj3oqk | |
Xu0Ze6Sz8EbC7udHsyxE | |
jNv0M7lWNJCfegOlDCJH | |
UK56XrCbPj6HD4HfwT57 | |
dtwpXGkWMjhpe3UcMJJ8 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{{ test | to_nice_yaml }} | |
{{ test | to_yaml }} | |
{{ test.multiline }} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$ ansible --version | |
ansible 2.8.0 | |
config file = /etc/ansible/ansible.cfg | |
configured module search path = ['/home/j/.ansible/plugins/modules', '/usr/share/ansible/plugins/modules'] | |
ansible python module location = /usr/lib/python3.7/site-packages/ansible | |
executable location = /usr/bin/ansible | |
python version = 3.7.3 (default, Mar 26 2019, 21:43:19) [GCC 8.2.1 20181127] |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment