The formula is broken on Debian
n-rodriguez opened this issue · 2 comments
n-rodriguez commented
Hi! When running the vim
state, this error happens:
ID: /etc/vim/vimrc
Function: file.managed
Result: False
Comment: An exception occurred in this state: Traceback (most recent call last):
File "/usr/lib/python2.7/dist-packages/salt/state.py", line 1843, in call
**cdata['kwargs'])
File "/usr/lib/python2.7/dist-packages/salt/loader.py", line 1795, in wrapper
return f(*args, **kwargs)
File "/usr/lib/python2.7/dist-packages/salt/states/file.py", line 2313, in managed
**kwargs
File "/usr/lib/python2.7/dist-packages/salt/modules/file.py", line 4407, in check_managed_changes
**kwargs)
File "/usr/lib/python2.7/dist-packages/salt/modules/file.py", line 3901, in get_managed
**kwargs)
File "/usr/lib/python2.7/dist-packages/salt/utils/templates.py", line 167, in render_tmpl
output = render_str(tmplstr, context, tmplpath)
File "/usr/lib/python2.7/dist-packages/salt/utils/templates.py", line 431, in render_jinja_tmpl
buf=tmplstr)
SaltRenderError: Jinja variable 'str object' has no attribute 'get'
Started: 01:49:39.019781
Duration: 305.084 ms
Changes:
n-rodriguez commented
It's due to :
{%- if grains['os'] == 'Arch' -%}
{{ set_config('runtime!', 'archlinux.vim') }}
{% endif -%}
{%- if grains['os'] == 'Debian' -%}
{{ set_config('runtime!', 'debian.vim') }}
{% endif -%}
in vimrc file
It seems that set_config
macro waits for a map argument and we pass 2 strings to it.
n-rodriguez commented
Thank you!