25 lines
556 B
YAML
25 lines
556 B
YAML
|
---
|
||
|
- hosts: all
|
||
|
|
||
|
tasks:
|
||
|
|
||
|
- name: Install Chrony
|
||
|
package: name=chrony state=latest
|
||
|
notify: Restart Chrony
|
||
|
|
||
|
- name: Show pools
|
||
|
debug: var=chrony_pools
|
||
|
|
||
|
- name: Template config file
|
||
|
template: "src=chrony.conf.j2 dest='{{ chrony_config_path }}' mode=0644 owner=root group=root backup=yes"
|
||
|
notify: Restart Chrony
|
||
|
|
||
|
- name: Enable Chrony at boot
|
||
|
service: "name={{ chrony_service_name }} enabled=yes"
|
||
|
|
||
|
handlers:
|
||
|
|
||
|
- name: Restart Chrony
|
||
|
service: "name='{{ chrony_service_name }}' state=restarted"
|
||
|
|