mirror of
https://github.com/saltstack-formulas/timezone-formula.git
synced 2024-11-28 09:57:45 +01:00
21 lines
535 B
Plaintext
21 lines
535 B
Plaintext
# This state configures the timezone.
|
|
|
|
{%- set timezone = salt['pillar.get']('timezone:name', 'Europe/Berlin') %}
|
|
{%- set utc = salt['pillar.get']('timezone:utc', True) %}
|
|
{% from "timezone/map.jinja" import confmap with context %}
|
|
|
|
timezone_setting:
|
|
timezone.system:
|
|
- name: {{ timezone }}
|
|
- utc: {{ utc }}
|
|
|
|
timezone.packages:
|
|
pkg.installed:
|
|
- name: {{ confmap.pkgname }}
|
|
|
|
file.symlink:
|
|
- name: {{ confmap.path-localtime }}
|
|
- target: {{ path-zoneinfo }}{{ timezone }}
|
|
- require:
|
|
- pkg: {{ confmap.pkgname }}
|