Преглед на файлове

Merge pull request #8 from rossengeorgiev/slspath-patch

replace hardcoded paths with slspath variable
fixconfig
Niels Abspoel преди 7 години
родител
ревизия
d3444bb41b
No account linked to committer's email address
променени са 6 файла, в които са добавени 10 реда и са изтрити 8 реда
  1. +4
    -2
      chrony/config.sls
  2. +1
    -1
      chrony/defaults.yaml
  3. +1
    -1
      chrony/files/chrony_config
  4. +1
    -1
      chrony/init.sls
  5. +2
    -2
      chrony/map.jinja
  6. +1
    -1
      chrony/removed.sls

+ 4
- 2
chrony/config.sls Целия файл

@@ -1,13 +1,15 @@
{% from "chrony/map.jinja" import chrony with context %}
{% from slspath+"/map.jinja" import chrony with context %}

include:
- chrony
- .init

chrony_config:
file.managed:
- name: {{ chrony.config }}
- source: {{ chrony.config_src }}
- template: jinja
- defaults:
slspath: {{ slspath|yaml_encode }}
- user: root
- mode: 644
- watch_in:

+ 1
- 1
chrony/defaults.yaml Целия файл

@@ -4,7 +4,7 @@ chrony:
package: chrony
service: chronyd
config: /etc/chrony.conf
config_src: salt://chrony/files/chrony_config
config_src: salt://{{ slspath }}/files/chrony_config
ntpservers: [ '0.us.pool.ntp.org',
'1.us.pool.ntp.org',
'2.us.pool.ntp.org',

+ 1
- 1
chrony/files/chrony_config Целия файл

@@ -1,4 +1,4 @@
{% 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
{% for server in config.ntpservers -%}
server {{ server }} {{ config.options }}

+ 1
- 1
chrony/init.sls Целия файл

@@ -1,4 +1,4 @@
{% from "chrony/map.jinja" import chrony with context %}
{% from slspath+"/map.jinja" import chrony with context %}

chrony:
pkg.installed:

+ 2
- 2
chrony/map.jinja Целия файл

@@ -1,6 +1,6 @@
{## 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'](
defaults,

+ 1
- 1
chrony/removed.sls Целия файл

@@ -1,4 +1,4 @@
{% from "chrony/map.jinja" import chrony with context %}
{% from slspath+"/map.jinja" import chrony with context %}

chrony_removed:
service.dead:

Loading…
Отказ
Запис