ansible-role-chrony/tasks/main.yml
Adrien Reslinger 5649568173
Some checks reported errors
continuous-integration/drone/push Build encountered an error
Update ansible code
2022-08-16 16:17:38 +02:00

34 lines
731 B
YAML

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