Saltstack Official Chrony Formula
您最多选择25个主题 主题必须以字母或数字开头,可以包含连字符 (-),并且长度不得超过35个字符

123456789101112131415161718192021222324252627
  1. # -*- coding: utf-8 -*-
  2. # vim: ft=sls
  3. {#- Get the `tplroot` from `tpldir` #}
  4. {%- set tplroot = tpldir.split('/')[0] %}
  5. {%- set sls_package_install = tplroot ~ '.package.install' %}
  6. {%- from tplroot ~ "/map.jinja" import chrony with context %}
  7. {%- from tplroot ~ "/libtofs.jinja" import files_switch with context %}
  8. include:
  9. - {{ sls_package_install }}
  10. chrony-config-file-file-managed:
  11. file.managed:
  12. - name: {{ chrony.config }}
  13. - source: {{ files_switch(['chrony.conf.jinja'],
  14. lookup='chrony-config-file-file-managed'
  15. )
  16. }}
  17. - mode: 644
  18. - user: root
  19. - group: root
  20. - template: jinja
  21. - context:
  22. chrony: {{ chrony|json }}
  23. - require:
  24. - sls: {{ sls_package_install }}