Break a string over multiple lines — Ansible”>” and “|” operators

How to use multi-line YAML variables in Ansible using the “|”, Literal Block Scalar, and the “>”, Folded Block Scalar, operators. Plus how to elide the new line “\n” at the end of the line and print multi-line with debug module on a terminal.



Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store
Ansible Pilot

I help creative Automation DevOps, Cloud Engineer, System Administrator, and IT Professional to succeed with Ansible Technology to automate more things everyday