How can I create and pass a dynamic dictionary as a module parameter. I
have a custom module that accepts parameters:
-
name: 'Custom module'
custom_module:
parameter1: 'Some Value'
parameter2:
'{{ var1 }}' : '{{ value1 }}'
'{{ var2 }}' : '{{ value2 }}'
I tried the below:
-
name: 'Custom module'
custom_module:
parameter1: 'Some Value'
parameter2: '{{ item }}'
with_dict:
"{'{{var1}}': '{{value1}}'}"
But item is in key:value format {key: var1, value: value1} , instead I need
it in format - { var1 : value1 }
How can I achieve this?
--
You received this message because you are subscribed to the Google Groups
"Ansible Project" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To post to this group, send email to [email protected].
To view this discussion on the web visit
https://groups.google.com/d/msgid/ansible-project/ef278496-f902-48a2-a102-ab23a4e25d72%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.