Fix for situation that we discovered in our environment.
We have in pillar variables that comes from external systems.
Those variables are string.
In file rules.sls there is if that expect that all variables are dict
Example of a pillar that throws error
example pilar
my_value: 'string'
iptables:
service:
..
[dev] ROOT@dev-01:~# salt-call state.apply iptables test=true
[INFO ] Loading fresh modules for state activity
[ERROR ] Rendering exception occurred: Jinja variable 'str object' has no attribute 'get'
[CRITICAL] Rendering SLS 'dev_env:iptables.rules' failed: Jinja variable 'str object' has no attribute 'get'
local:
Data failed to compile:
Rendering SLS 'dev_env:iptables.rules' failed: Jinja variable 'str object' has no attribute 'get'
Fix for situation that we discovered in our environment. We have in pillar variables that comes from external systems. Those variables are string. In file rules.sls there is if that expect that all variables are dict
Example of a pillar that throws error
example pilar
my_value: 'string' iptables: service: ..
[dev] ROOT@dev-01:~# salt-call state.apply iptables test=true [INFO ] Loading fresh modules for state activity [ERROR ] Rendering exception occurred: Jinja variable 'str object' has no attribute 'get' [CRITICAL] Rendering SLS 'dev_env:iptables.rules' failed: Jinja variable 'str object' has no attribute 'get' local: Data failed to compile: Rendering SLS 'dev_env:iptables.rules' failed: Jinja variable 'str object' has no attribute 'get'