My host inventory has a host specific variable and it looks as follows -
[local]
localhost
[server_nodes]
abcd.compute-1.amazonaws.com
[client_nodes]
xyz.compute-1.amazonaws.com subs=“["elasticsearch_nodes"]”
ghi.compute-1.amazonaws.com subs=“["elasticsearch_nodes"]”
jkl.compute-1.amazonaws.com subs=‘[“nginx_nodes”]’
I’m talking about the “subs” variable here. I have tried using it in three different ways as shown above but none of them solves my purpose. Actually I want to keep double quotes. So if I put the following in a template file -
var1 = {{ subs }}
It should get converted to -
var1 = [“nginx_nodes”]
instead it gets converted to -
var1 = [‘nginx_nodes’]
I want to keep double quotes and avoid getting them converted to single quotes. Please provide some suggestions. Thanks.