FAQ
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 could use single quotes, I guess, which "should" make it a string...

Alex
On 18 Sep 2014 19:47, "Benjamen Keroack" <[email protected] <javascript:>>
wrote:
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 value
es_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: true

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 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 [email protected] <javascript:>.
For more options, visit https://groups.google.com/d/optout.
--
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 [email protected].
For more options, visit https://groups.google.com/d/optout.

Search Discussions

Discussion Posts

Previous

Follow ups

Related Discussions

Discussion Navigation
viewthread | post
posts ‹ prev | 3 of 8 | next ›
Discussion Overview
groupsalt-users @
postedSep 18, '14 at 6:47p
activeSep 26, '14 at 5:11p
posts8
users4

People

Translate

site design / logo © 2023 Grokbase