timezone-formula/timezone/init.sls

28 lines
629 B
Plaintext
Raw Normal View History

# -*- coding: utf-8 -*-
# vim: ft=sls
2015-04-25 11:04:14 +02:00
{#- Get the `tplroot` from `tpldir` #}
{%- set tplroot = tpldir.split('/')[0] %}
{%- from tplroot ~ "/map.jinja" import timezone with context %}
2015-04-25 11:04:14 +02:00
timezone_setting:
timezone.system:
- name: {{ timezone.name }}
- utc: {{ timezone.utc }}
{%- if grains.os not in ('MacOS', 'Windows') %}
2019-06-11 13:58:29 +02:00
timezone_packages:
pkg.installed:
- name: {{ timezone.pkg.name }}
timezone_symlink:
file.symlink:
- name: {{ timezone.path_localtime }}
- target: {{ timezone.path_zoneinfo }}{{ timezone.name }}
- force: true
- require:
- pkg: {{ timezone.pkg.name }}
2019-06-11 13:58:29 +02:00
{%- endif %}