Ansible question
I have a variable, let call it value1 and a J2 template.
The J2 template includes the following line :
LINE=” This string mut be included this string is optional= {{ value1}}”
What I need to implement
If value1 is defined with a string – let assume that the string is OK (Value1: OK)
, the file should be
LINE=” This string must be included this string is optional= OK”
If value1 is not defined (empty Value1: ) –the file should be
LINE=” This string must be included”
So how the J2 should be configured?