I’m trying to use Salt to configure my system, and I’m trying to use Pillar to have some modularity by allowing to create several qubes based on one Salt formula.
Unfortunately, I can’t manage to create any datastructure in my pillar, for now I only succeeded making tuple:
top-level:
item: value
item: value
When I try to add some real dictionary looking something like this:
top-level:
item:
key: value
key: value
item:
key: value
key: value
qubesctl throw me an error Rendering SLS failed : mapping values are not allowed in this context
Is there something specific of QubesOS enforcing this ? Or am I missing something?
There must be an error in the resulting YAML… Are you using any character that could be interpreted by YAML as something else? Can you try to double-quote the values?
@unman got it right, your region_data is a dictonary.
I debug like this:
{% test = pillar.get('regions', {}).items() %}
{%- do salt.log.critical( 'test_data: %s'|format( test )) -%}
{% for region_name, region_data in test %}
{%- do salt.log.critical( 'region_name: %s'|format( region_name )) -%}
{%- do salt.log.critical( 'region_data: %s'|format( region_data )) -%}
{% endfor %}