34 lines
616 B
YAML
34 lines
616 B
YAML
|
---
|
||
|
- name: Install package
|
||
|
ansible.builtin.package:
|
||
|
name:
|
||
|
- chrony
|
||
|
tags: chrony
|
||
|
|
||
|
- name: Copy config
|
||
|
ansible.builtin.template:
|
||
|
src: chrony.conf.j2
|
||
|
dest: /etc/chrony/chrony.conf
|
||
|
owner: root
|
||
|
group: root
|
||
|
mode: "0644"
|
||
|
notify: Restart chrony
|
||
|
tags: chrony
|
||
|
|
||
|
- name: Copy keys
|
||
|
ansible.builtin.template:
|
||
|
src: chrony.keys.j2
|
||
|
dest: /etc/chrony/chrony.keys
|
||
|
owner: root
|
||
|
group: root
|
||
|
mode: "0600"
|
||
|
notify: Restart chrony
|
||
|
tags: chrony
|
||
|
|
||
|
- name: Enable and start service
|
||
|
ansible.builtin.service:
|
||
|
name: chronyd
|
||
|
state: started
|
||
|
enabled: true
|
||
|
tags: chrony
|