Snippets

iSeatz jinja issue

You are viewing an old version of this snippet. View the current version.
Revised by Tim Kelley 6e96710

the sls:

{% import 'global/settings.sls' as global with context %}

ec2.set_private_A_record:
  boto_route53.present:
    - zone: iz.
    - name: {{ global.fqdn }}.
    - value: {{ global.private_ip }}
    - record_type: A
    - ttl: 60
    - wait_for_sync: False

ec2.set_private_PTR_record:
  boto_route53.present:
    - zone: 10.in-addr.arpa.
    - name: {{ global.ptr_value }}
    - value: {{ global.fqdn }}
    - record_type: ptr
    - wait_for_sync: false
[ERROR   ] Rendering exception occurred: Jinja variable 'jinja2.environment.TemplateModule object' has no attribute 'ptr_value'
[ERROR   ] An un-handled exception was caught by salt's global exception handler:
SaltRenderError: Jinja variable 'jinja2.environment.TemplateModule object' has no attribute 'ptr_value'
Traceback (most recent call last):
  File "/usr/bin/salt-call", line 11, in <module>
    salt_call()
  File "/usr/lib/python2.7/dist-packages/salt/scripts.py", line 379, in salt_call
    client.run()
  File "/usr/lib/python2.7/dist-packages/salt/cli/call.py", line 58, in run
    caller.run()
  File "/usr/lib/python2.7/dist-packages/salt/cli/caller.py", line 134, in run
    ret = self.call()
  File "/usr/lib/python2.7/dist-packages/salt/cli/caller.py", line 197, in call
    ret['return'] = func(*args, **kwargs)
  File "/usr/lib/python2.7/dist-packages/salt/modules/cp.py", line 261, in get_template
    **kwargs)
  File "/usr/lib/python2.7/dist-packages/salt/fileclient.py", line 676, in get_template
    **kwargs
  File "/usr/lib/python2.7/dist-packages/salt/utils/templates.py", line 178, in render_tmpl
    output = render_str(tmplstr, context, tmplpath)
  File "/usr/lib/python2.7/dist-packages/salt/utils/templates.py", line 386, in render_jinja_tmpl
    buf=tmplstr)
SaltRenderError: Jinja variable 'jinja2.environment.TemplateModule object' has no attribute 'ptr_value'
HTTPS SSH

You can clone a snippet to your computer for local editing. Learn more.