Allows the use of gitfs mountpoint and renaming hte folder without the need to manually update any of the pathstags/v0.2.0
{% from "chrony/map.jinja" import chrony with context %} | |||||
{% from slspath+"/map.jinja" import chrony with context %} | |||||
include: | include: | ||||
- chrony | |||||
- .init | |||||
chrony_config: | chrony_config: | ||||
file.managed: | file.managed: | ||||
- name: {{ chrony.config }} | - name: {{ chrony.config }} | ||||
- source: {{ chrony.config_src }} | - source: {{ chrony.config_src }} | ||||
- template: jinja | - template: jinja | ||||
- defaults: | |||||
slspath: {{ slspath|yaml_encode }} | |||||
- user: root | - user: root | ||||
- mode: 644 | - mode: 644 | ||||
- watch_in: | - watch_in: |
package: chrony | package: chrony | ||||
service: chronyd | service: chronyd | ||||
config: /etc/chrony.conf | config: /etc/chrony.conf | ||||
config_src: salt://chrony/files/chrony_config | |||||
config_src: salt://{{ slspath }}/files/chrony_config | |||||
ntpservers: [ '0.us.pool.ntp.org', | ntpservers: [ '0.us.pool.ntp.org', | ||||
'1.us.pool.ntp.org', | '1.us.pool.ntp.org', | ||||
'2.us.pool.ntp.org', | '2.us.pool.ntp.org', |
{% from "chrony/map.jinja" import chrony as config with context %} | |||||
{% from slspath+"/map.jinja" import chrony as config with context %} | |||||
# This file is managed by salt | # This file is managed by salt | ||||
{% for server in config.ntpservers -%} | {% for server in config.ntpservers -%} | ||||
server {{ server }} {{ config.options }} | server {{ server }} {{ config.options }} |
{% from "chrony/map.jinja" import chrony with context %} | |||||
{% from slspath+"/map.jinja" import chrony with context %} | |||||
chrony: | chrony: | ||||
pkg.installed: | pkg.installed: |
{## start with defaults from defaults.yaml ##} | {## start with defaults from defaults.yaml ##} | ||||
{% import_yaml "chrony/defaults.yaml" as defaults %} | |||||
{% import_yaml "chrony/osmap.yaml" as osmap %} | |||||
{% import_yaml slspath+"/defaults.yaml" as defaults %} | |||||
{% import_yaml slspath+"/osmap.yaml" as osmap %} | |||||
{% set chrony = salt['grains.filter_by']( | {% set chrony = salt['grains.filter_by']( | ||||
defaults, | defaults, |
{% from "chrony/map.jinja" import chrony with context %} | |||||
{% from slspath+"/map.jinja" import chrony with context %} | |||||
chrony_removed: | chrony_removed: | ||||
service.dead: | service.dead: |