Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- --- the defaults.yaml
- {% load_yaml as rawmap %}
- Debian:
- common:
- timezone:
- managed: True # Set to False to ignore this "module"
- name: "Europe/Berlin"
- utc: True
- {% endload %}
- --- the SLS
- #!jinja|yaml
- #
- # Copy of https://github.com/bechtoldt/saltstack-time-formula/blob/master/time/init.sls
- #
- {% from "common/defaults.yaml" import rawmap with context %}
- {% set datamap = salt['grains.filter_by'](rawmap, merge=salt['pillar.get']('common:lookup')) %}
- {% if datamap.timezone.managed %}
- systimezone:
- timezone:
- - system
- - name: {{ datamap.timezone.name }}
- - utc: {{ datamap.timezone.utc }}
- {% endif %}
- --- the error:
- saltmaster.pcdummy.lan:
- Data failed to compile:
- ----------
- Rendering SLS 'base:common.timezone' failed: Jinja variable 'dict object' has no attribute 'timezone'
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement