-
Notifications
You must be signed in to change notification settings - Fork 419
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
salt.minion fails when applied with salt-ssh #172
Comments
+1 |
As mentioned in the SaltStack issue, another work-around with salt-ssh is to mark the file as an external resource:
|
workaround doesn't work for me
|
Think yours might be a different problem... that's map.jinja (vs formulas.jinja) |
https://github.com/saltstack-formulas/salt-formula/blob/master/salt/ssh.sls uses |
So you'd have to add map.jinja to the extra filerefs |
doesn't help :( |
I can confirm trying to use Adding both |
@zenitraM This is almost definitely due to If I can provide you with an updated |
@myii sure thing! |
@zenitraM This should do the trick. Use this as your # -*- coding: utf-8 -*-
# vim: ft=jinja
{#- Get the `tplroot` from `tpldir` #}
{%- set tplroot = tpldir.split('/')[0] %}
{#- Start imports as #}
{%- import_yaml tplroot ~ "/defaults.yaml" as default_settings %}
{%- import_yaml tplroot ~ "/osfamilymap.yaml" as osfamilymap %}
{%- import_yaml tplroot ~ "/osmap.yaml" as osmap %}
{#- Retrieve the config dict only once #}
{%- set _config = salt['config.get'](tplroot, default={}) %}
{%- set defaults = salt['grains.filter_by'](
default_settings,
default=tplroot,
merge=salt['grains.filter_by'](
osfamilymap,
grain='os_family',
merge=salt['grains.filter_by'](
osmap,
grain='os',
merge=salt['grains.filter_by'](
_config,
default='lookup'
)
)
)
)
%}
{%- set config = salt['grains.filter_by'](
{'defaults': defaults},
default='defaults',
merge=_config
)
%}
{%- set salt_settings = config %}
{%- set formulas_settings = salt['pillar.get']('salt_formulas',default=default_settings['salt_formulas'], merge=True) %} |
This updated map.jinja produces the same TemplateNotFound: salt/map.jinja Traceback for me using a fresh install of Salt 3000 |
@windowsrefund It's difficult to troubleshoot without further details of your setup. @baby-gnu If you get a chance, can you try this out on |
Hello @myii, I tried with the following pillar: # -*- coding: utf-8 -*-
# vim: ft=yaml
---
salt:
master:
fileserver_backend:
- rootfs
file_roots:
base:
- /srv/salt
pillar_roots:
base:
- /srv/pillar it's failing with the following error:
|
I'm not using It looks like the import from a Jinja2 As an example, here is a test:
When running:
When I remove all the import from
I found several references in
Another argument for passing |
So, there is 2 issues:
|
@myii no difference since the |
@baby-gnu Looks like we'll have our work cut out when we try to introduce the new |
For the |
I just posted this issue with SaltStack as I believe the bug exists in
salt-ssh
rather than in this formula directly. This is really just for visibility.Brief summary:
When calling salt.minion via
salt-ssh
, theformulas.jinja
file is not included and so theminion.d/f_defaults.conf
file fails to render.Workaround is to simply modify the following lines in
salt/files/minion.d/f_defaults.conf
:The text was updated successfully, but these errors were encountered: