tlu/salt/states/chrony/init.sls

32 lines
710 B
Plaintext
Raw Permalink Normal View History

2021-09-22 07:49:42 +00:00
install chrony:
pkg.installed:
- name: chrony
create chrony pool configuration:
file.managed:
- name: /etc/chrony.d/pool.conf
- source: salt://chrony/files/pool.conf.jinja
- template: jinja
- user: root
- group: chrony
- mode: "0640"
create chrony local configuration:
file.managed:
- name: /etc/chrony.d/local.conf
- source: salt://chrony/files/local.conf.jinja
- template: jinja
- user: root
- group: chrony
- mode: "0640"
start chronyd:
service.running:
- name: chronyd
- enable: True
- require:
- pkg: install chrony
- watch:
- file: create chrony pool configuration
- file: create chrony local configuration