2019-08-26 00:32:51 +02:00
|
|
|
# -*- coding: utf-8 -*-
|
|
|
|
# vim: ft=sls
|
2015-04-25 11:04:14 +02:00
|
|
|
|
2019-08-26 00:32:51 +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:
|
2019-08-26 00:32:51 +02:00
|
|
|
- name: {{ timezone.name }}
|
|
|
|
- utc: {{ timezone.utc }}
|
2015-04-25 12:23:45 +02:00
|
|
|
|
2019-08-26 00:32:51 +02:00
|
|
|
{%- if grains.os not in ('MacOS', 'Windows') %}
|
2019-06-11 13:58:29 +02:00
|
|
|
|
2015-04-25 12:23:45 +02:00
|
|
|
timezone_packages:
|
|
|
|
pkg.installed:
|
2019-08-26 00:32:51 +02:00
|
|
|
- name: {{ timezone.pkg.name }}
|
2015-04-25 12:23:45 +02:00
|
|
|
|
|
|
|
timezone_symlink:
|
|
|
|
file.symlink:
|
2019-08-26 00:32:51 +02:00
|
|
|
- name: {{ timezone.path_localtime }}
|
|
|
|
- target: {{ timezone.path_zoneinfo }}{{ timezone.name }}
|
2015-04-25 12:23:45 +02:00
|
|
|
- force: true
|
|
|
|
- require:
|
2019-08-26 00:32:51 +02:00
|
|
|
- pkg: {{ timezone.pkg.name }}
|
2019-06-11 13:58:29 +02:00
|
|
|
|
2019-08-26 00:32:51 +02:00
|
|
|
{%- endif %}
|