Hello. I’m running Ansible 1.2.2 (seeing the below behavior on OSX and CentOS 6.4). My understanding is that in 1.2+, I can use {{ var }} syntax everywhere. In a role task I have this:
Furthermore, the failure of your variable to evaluate is probably because the other variable didn’t substitute. Ansible probably couldn’t template something else on the line.
Thank you Michael. It was indeed the multi-line syntax error. Once I properly added the “copy: >” for multi-line, I was able to use the new variable syntax successfully.
It’s a little surprising that with incorrect multi-line syntax using the old variable syntax ${} masked the actual error. Regardless, I have a fix. Thanks for the fast reply.