Hi everyone,
I am using Salt to record some of my personal configuration. I enabled the user directories.
I am currently turning my original split-SSH state into a formula. Part of that is taking advantage of Salt pillar.
So far, placing my pillar data in /srv/user_pillar/split-ssh/
makes it accessible as I expect. Using Jinja to template some of those files work fine too, until I try to:
{% from 'example.jinja' import example_macro %}
At that point I get:
jinja2.exceptions.TemplateNotFound: example.jinja
The file example.jinja
is in the same directory as the file I’m trying to importing it from (/srv/user_pillar/split-ssh/
).
My understanding is that the path needs to be relative to pillar_roots
, which is defined in /etc/salt/master
as /srv/pillar
.
I’ve tried without success:
'../user_pillar/split-ssh/example.jinja'
'split-ssh/example.jinja'
'example.jinja'
Does anyone know what the pillar import path should look like when using the /srv/user_pillar
?
For additional context: I experience the same problem when attempting to:
{% load_yaml 'config.yaml' as config %}
Any clues welcome! I can provide entire code snippets if that helps