Skip to content

Instantly share code, notes, and snippets.

@garionphx
garionphx / gist:08d4c2a529cbcc4ae000
Created May 10, 2015 05:10
pillar for my problem.
database_conn:
{% for server, addrs in salt['mine.get']('nodetype:infrastructure', 'network.ip_addrs', expr_form='grain').items() %}
host: {{ addrs[0] }}
{% endfor %}
port: 3306
username: test
password: test
database: testdb
@garionphx
garionphx / gist:ddd24a29153047aa1b7e
Created May 10, 2015 05:09
error when calling highstate, trying to access a mine from a pillar.
2015-05-10 05:07:23,503 [salt.pillar ][CRITICAL] Rendering SLS 'dev-pillars' failed, render error:
Jinja error: 'master_uri'
Traceback (most recent call last):
File "/usr/lib/python2.7/dist-packages/salt/utils/templates.py", line 280, 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 2, in top-level template code