ansible/roles/chrony/tasks/main.yaml

33 lines
708 B
YAML
Raw Normal View History

2019-03-16 20:34:53 +00:00
---
- name: gather OS specific variables
include_vars: "{{ item }} "
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:
- reload chrony
- 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: