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