Skip to content

Instantly share code, notes, and snippets.

Created July 29, 2013 19:37
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save anonymous/44b544127fafa80f9ee4 to your computer and use it in GitHub Desktop.
Save anonymous/44b544127fafa80f9ee4 to your computer and use it in GitHub Desktop.
{% if grains['env'] == 'dev' %}
php-pecl-xdebug:
pkg:
- installed
require:
- pkg:
- php-cli
- php-pear
xdebug-file:
file.managed:
- name: /etc/php.d/xdebug.ini
- source: salt://php/files/php.d/xdebug.ini
- require:
- pkg:
- php-cli
- php-pear
{% endif %}
[root@archon core]# salt 'centos6-tester' state.sls php
centos6-tester:
Data failed to compile:
----------
Rendering SLS php failed, render error: Traceback (most recent call last):
File "/usr/lib/python2.6/site-packages/salt/utils/templates.py", line 58, in render_tmpl
output = render_str(tmplstr, context, tmplpath)
File "/usr/lib/python2.6/site-packages/salt/utils/templates.py", line 107, in render_jinja_tmpl
output = jinja_env.from_string(tmplstr).render(**context)
File "/usr/lib64/python2.6/site-packages/jinja2/environment.py", line 669, in render
return self.environment.handle_exception(exc_info, True)
File "<template>", line 57, in top-level template code
UndefinedError: 'dict' object has no attribute 'env'
Traceback (most recent call last):
File "/usr/lib/python2.6/site-packages/salt/state.py", line 1774, in render_state
rendered_sls=mods
File "/usr/lib/python2.6/site-packages/salt/template.py", line 64, in compile_template
ret = render(input_data, env, sls, **render_kwargs)
File "/usr/lib/python2.6/site-packages/salt/renderers/jinja.py", line 41, in render
tmp_data.get('data', 'Unknown render error in jinja renderer')
SaltRenderError: Traceback (most recent call last):
File "/usr/lib/python2.6/site-packages/salt/utils/templates.py", line 58, in render_tmpl
output = render_str(tmplstr, context, tmplpath)
File "/usr/lib/python2.6/site-packages/salt/utils/templates.py", line 107, in render_jinja_tmpl
output = jinja_env.from_string(tmplstr).render(**context)
File "/usr/lib64/python2.6/site-packages/jinja2/environment.py", line 669, in render
return self.environment.handle_exception(exc_info, True)
File "<template>", line 57, in top-level template code
UndefinedError: 'dict' object has no attribute 'env'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment