node.data: True
Somehow the value is being converted to a Python True value somewhere and this is getting written to the file. This breaks this configuration file (Elasticsearch) which is case sensitive and requires "true" (not "True").
Any ideas how to fix?
Ben
You could use single quotes, I guess, which "should" make it a string...
Alex
--
You received this message because you are subscribed to the Google Groups "Salt-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to salt-users+...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Enclosing the values in single quotes didn't work. true/false are still coerced to True/False.
Enclosing the values in single quotes didn't work. true/false are still coerced to True/False.This is super annoying. Am I really going to have to do a file.replace to get rid of the capitals?
This didn't work. The file.replace state immediately afterward still found and replaced the capitals.
On Thursday, September 25, 2014 1:42:45 AM UTC-7, Daniel Jagszent wrote:
--
You received this message because you are subscribed to the Google Groups "Salt-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to salt-users+...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Hello Benjamen,
Benjamen Keroack wrote:
this should work. Maybe you placed the single quotes in the wrong place? Alex meant putting them here (marked red and underlined for visibility):# state (partial)/etc/elasticsearch/elasticsearch.yml:file.managed:[...]- node_data: '{{ pillar['es_node_data'] }}'- template: jinja
Enclosing the values in single quotes didn't work. true/false are still coerced to True/False.This is super annoying. Am I really going to have to do a file.replace to get rid of the capitals?
On Thursday, September 18, 2014 11:54:56 AM UTC-7, Alex Leonhardt wrote:
--
You received this message because you are subscribed to the Google Groups "Salt-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to salt-users+...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
You could use single quotes, I guess, which "should" make it a string...
Alex
--
You received this message because you are subscribed to the Google Groups "Salt-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to salt-users+...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
I'm using pillar to populate a configuration file template with values via file.managed in a state.
The problem I'm having is that the following pillar value is always silently converted to a Python boolean value instead of text:# pillar valuees_node_data: "true"
# state (partial)/etc/elasticsearch/elasticsearch.yml:file.managed:[...]- node_data: {{ pillar['es_node_data'] }}- template: jinja
# template file (partial)node.data: {{ node_data }}# resulting line in file# should be# node.data: truenode.data: True
Somehow the value is being converted to a Python True value somewhere and this is getting written to the file. This breaks this configuration file (Elasticsearch) which is case sensitive and requires "true" (not "True").
Any ideas how to fix?
Ben