ansible-role-chrony/tasks/main.yml
Adrien ae128a537d
All checks were successful
continuous-integration/drone/push Build is passing
fix lint
2020-06-04 21:23:17 +02:00

34 lines
667 B
YAML

---
- name: Include vars for {{ ansible_os_family }}
include_vars: "{{ ansible_os_family }}.yml"
- name: Install chrony packages
package:
name: "{{ chrony_packages_name }}"
state: present
update_cache: yes
notify: Restart chronyd
- name: Deploy chronyd configuration
template:
src: chrony.conf.j2
dest: /etc/chrony.conf
owner: root
group: root
mode: 0644
notify: Restart chronyd
- name: Enable chronyd on boot
service:
name: chronyd
enabled: yes
- name: Open Firewalld
firewalld:
service: ntp
permanent: true
state: enabled
immediate: true
zone: internal
when:
- chrony_allowclients