0
0
mirror of https://github.com/saltstack-formulas/timezone-formula.git synced 2024-11-28 03:27:59 +01:00
timezone-formula/timezone/init.sls
2019-09-01 01:06:33 +02:00

28 lines
629 B
Plaintext

# -*- coding: utf-8 -*-
# vim: ft=sls
{#- Get the `tplroot` from `tpldir` #}
{%- set tplroot = tpldir.split('/')[0] %}
{%- from tplroot ~ "/map.jinja" import timezone with context %}
timezone_setting:
timezone.system:
- name: {{ timezone.name }}
- utc: {{ timezone.utc }}
{%- if grains.os not in ('MacOS', 'Windows') %}
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 }}
{%- endif %}