install timezone pkg and update symlink based on osfamily
This commit is contained in:
parent
d13d7c71ce
commit
3fb41ca3b8
|
@ -2,8 +2,19 @@
|
|||
|
||||
{%- 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 }}
|
||||
|
||||
{{ confmap.path-localtime }}:
|
||||
file.symlink:
|
||||
- target: {{ path-zoneinfo }}{{ timezone }}
|
||||
- require:
|
||||
- pkg: {{ confmap.pkgname }}
|
||||
|
|
|
@ -0,0 +1,9 @@
|
|||
{% set map = {
|
||||
'Suse': {
|
||||
'path-localtime': '/etc/localtime',
|
||||
'path-zoneinfo': '/usr/share/zoneinfo/',
|
||||
'pkgname': 'timezone',
|
||||
},
|
||||
} %}
|
||||
|
||||
{% set confmap = map.get(grains.os_family) %}
|
Loading…
Reference in New Issue