I try to place / remove a drop in config file based on a PILLAR variable. This was put in highstate/init.sls on my salt master.
I cannot see any syntax error or spacing issues here. What am i doing wrong here?
Here my SLS file
(% if pillar['highstateenabled'] == 'true' %)
enable_highstate:
file.managed:
- name: /etc/salt/minion.d/highstate.conf
- source: salt://common/salt-minion/files/minion.d/highstate.conf
- template: jinja
(% else %)
disable_highstate:
file.absent:
- name: /etc/salt/minion.d/highstate.conf
(% endif %)
And the output during salt-call:
---
local:
Data failed to compile:
----------
Rendering SLS 'LAB:common.salt-minion' failed: mapping values are not allowed here; line 4
---
(% if pillar['highstateenabled'] == 'true' %)
enable_highstate: <======================
file.managed:
- name: /etc/salt/minion.d/highstate.conf
- source: salt://common/salt-minion/files/minion.d/highstate.conf
- template: jinja
[...]
---