Created
March 2, 2018 18:42
-
-
Save theaboutbox/a7268482ba6b307cddeb8a12c1a453ce to your computer and use it in GitHub Desktop.
Ansible multi-line string
This file contains hidden or 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
- name: Test multi-line string | |
hosts: localhost | |
connection: local | |
gather_facts: false | |
vars: | |
hello: world | |
tasks: | |
- name: Multi-line string with quotes and interpolation into shell command | |
shell: | | |
echo "Hello | |
'world'. hello = {{hello}}. This is \"quoted\"" | |
register: shell_out | |
- debug: var=shell_out |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment