2024-09/10/chrony_mit_handler.yml

25 lines
556 B
YAML
Raw Normal View History

2024-09-19 07:36:03 +00:00
---
- 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"