Hello All,
I have the following playbook. In the debug task, examplevar1 is expanding however in the callback it is not. Is there anyway for me to get this working?
Hello All,
I have the following playbook. In the debug task, examplevar1 is expanding however in the callback it is not. Is there anyway for me to get this working?
You probably want to quote the whole of examplevar2. Eg "this is {{ examplevar1 }}"
I would also use debug: var=examplevar2
Quoting the whole thing doesn’t appear to be working.
I don’t understand exactly what you’re trying to do. It seems to be working as expected?
Sorry, I should’ve been more clear. In the beginning of the output, I’m printing out the variables (for debugging purposes) from my callback plugin. I would expect to see “This is variable1” and not “This is {{ examplevar1 }}” for examplevar2. The debug task seems to work fine.
PLAY [all] *********************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************
{u’examplevar1’: u’variable1’, u’examplevar2’: u’This is {{ examplevar1 }}'} ← This is coming from the callback plugin.
Here is what the code looks like in the callback.
def v2_playbook_on_play_start(self, play):
print(play.vars)