ansible-role-chrony/tasks/main.yml
Adrien Reslinger 15319faac7
All checks were successful
continuous-integration/drone/push Build is passing
Fix lint error
2022-08-16 16:56:07 +02:00

34 lines
747 B
YAML

---
- name: Include vars for {{ ansible_os_family }}
ansible.builtin.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