ansible/roles/chrony/tasks/main.yaml

33 lines
724 B
YAML
Raw Normal View History

2019-03-16 20:34:53 +00:00
---
- name: gather OS specific variables
2022-08-31 03:19:06 +00:00
ansible.builtin.include_vars: "{{ item }}"
2019-03-16 20:34:53 +00:00
with_first_found:
- "{{ ansible_distribution }}.yaml"
- "{{ ansible_os_family }}.yaml"
- name: stop/disable systemd-timesyncd
service:
name: systemd-timesyncd.service
state: stopped
enabled: no
- name: install chrony
package:
name: "{{ chrony_package_name }}"
state: "{{ chrony_package_state }}"
- name: configure chrony
template:
src: chrony.conf.j2
dest: /etc/chrony/chrony.conf
notify:
2019-10-05 21:40:45 +00:00
- restart chrony
2019-03-16 20:34:53 +00:00
- name: start chrony
service:
name: "{{ chrony_service_name }}"
state: "{{ chrony_service_state }}"
enabled: "{{ chrony_service_enabled }}"
2019-03-27 07:08:13 +00:00
# vim:ft=yaml.ansible: