|
- {## start with defaults from defaults.yaml ##}
- {% import_yaml slspath+"/defaults.yaml" as defaults %}
- {% import_yaml slspath+"/osmap.yaml" as osmap %}
-
- {% set chrony = salt['grains.filter_by'](
- defaults,
- merge=salt['grains.filter_by'](
- osmap,
- grain='os_family',
- merge=salt['pillar.get']('chrony', {}),
- ),
- base='chrony'
- ) %}
-
- {# Debian distros check /etc/default/rcS to determine UTC setting #}
- {% if grains['os_family'] == "Debian" %}
- {% if salt['cmd.run']('grep UTC=no /etc/default/rcS', output_loglevel='quiet') %}
- {%- if chrony['otherparams'] and 'rtconutc' in chrony['otherparams'] %}
- {% do chrony['otherparams'].remove('rtconutc') %}
- {%- endif %}
- {% endif %}
- {% endif %}
|