2015-04-25 11:04:14 +02:00
|
|
|
# This state configures the timezone.
|
|
|
|
|
|
|
|
{%- set timezone = salt['pillar.get']('timezone:name', 'Europe/Berlin') %}
|
|
|
|
{%- set utc = salt['pillar.get']('timezone:utc', True) %}
|
2015-04-25 12:23:45 +02:00
|
|
|
{% from "timezone/map.jinja" import confmap with context %}
|
2015-04-25 11:04:14 +02:00
|
|
|
|
|
|
|
timezone_setting:
|
|
|
|
timezone.system:
|
|
|
|
- name: {{ timezone }}
|
|
|
|
- utc: {{ utc }}
|
2015-04-25 12:23:45 +02:00
|
|
|
|
2019-06-11 13:58:29 +02:00
|
|
|
{%- if grains.os not in ('MacOS', 'Windows') %}
|
|
|
|
|
2015-04-25 12:23:45 +02:00
|
|
|
timezone_packages:
|
|
|
|
pkg.installed:
|
|
|
|
- name: {{ confmap.pkgname }}
|
|
|
|
|
|
|
|
timezone_symlink:
|
|
|
|
file.symlink:
|
|
|
|
- name: {{ confmap.path_localtime }}
|
|
|
|
- target: {{ confmap.path_zoneinfo }}{{ timezone }}
|
|
|
|
- force: true
|
|
|
|
- require:
|
|
|
|
- pkg: {{ confmap.pkgname }}
|
2019-06-11 13:58:29 +02:00
|
|
|
|
|
|
|
{%- endif %}
|