-
-
Save omega/98390a70a18b9184ffb4 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
root@salt:~# salt 'web01*' state.highstate | |
web01: | |
Data failed to compile: | |
---------- | |
Rendering SLS 'base:web/nginx' failed: Jinja error: 'NoneType' object is not iterable | |
Traceback (most recent call last): | |
File "/usr/lib/python2.7/dist-packages/salt/utils/templates.py", line 306, in render_jinja_tmpl | |
output = template.render(**decoded_context) | |
File "/usr/lib/python2.7/dist-packages/jinja2/environment.py", line 969, in render | |
return self.environment.handle_exception(exc_info, True) | |
File "/usr/lib/python2.7/dist-packages/jinja2/environment.py", line 742, in handle_exception | |
reraise(exc_type, exc_value, tb) | |
File "<template>", line 7, in top-level template code | |
TypeError: 'NoneType' object is not iterable | |
; line 7 | |
--- | |
[...] | |
pkg.installed: [] | |
service.running: | |
- require: | |
- pkg: nginx | |
- watch: | |
{% for hostname, data in pillar.get('web:sites') %} <====================== | |
- file: /etc/nginx/sites-enabled/{{hostname}} | |
{% endfor %} | |
{% for hostname, data in pillar.get('web:sites') %} | |
/etc/nginx/sites-enabled/{{hostname}}: | |
file.managed: | |
[...] | |
--- |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
root@salt:~# salt '*' pillar.get web:sites | |
mongo01: | |
web01: | |
---------- | |
some.host.com: | |
---------- | |
location: | |
http://localhost:3000 | |
ssl: | |
True | |
websockets: | |
True |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment