Skip to content

Using map.jinja in salt states

Description from vendor https://docs.saltstack.com/en/latest/topics/best_practices.html

My opinion: NEVER USE

Reason 1

It is not possible to see the values from this map on node or salt-master by any command, like:

pillar.get
pillar.items
Reason 2

State will applied to the minion, even when node (or/and any parent class) has no any pillar data to this state.

Use saltclass with:
classes:
  # replacement data from map.jinja
  - roles.os.{{ __grains__['os'] }}

Clear