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
Florian Bittner 4e881296c7 Fix README.
Added FORMULA for Salt Package Manager

More detailed: https://docs.saltstack.com/en/latest/topics/spm/

install timezone pkg and update symlink based on osfamily

bugfix in symlink function

...#

another symlink bugfix testing

changed variable-names in jinja according to https://github.com/ansible/ansible/issues/3907

added debian to mapfile

changed function names for better looking code

changed FORMULA according to contents of map.jinja, other distributions may follow

added Redhat in map.jinja

added Redhat in map.jinja

added Redhat in map.jinja

install timezone data containing pkg on several distros and symlink to the choosen timezone
2016-09-29 18:44:05 +02:00

23 lines
589 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 }}
timezone_symlink:
file.symlink:
- name: {{ confmap.path_localtime }}
- target: {{ confmap.path_zoneinfo }}{{ timezone }}
- force: true
- require:
- pkg: {{ confmap.pkgname }}