|
|
|
@ -15,11 +15,13 @@
|
|
|
|
|
service: name=ntp state=stopped enabled=no
|
|
|
|
|
when: not ntp_service_enabled | bool
|
|
|
|
|
|
|
|
|
|
when: ansible_distribution_file_variety == "Debian"
|
|
|
|
|
when:
|
|
|
|
|
- ansible_distribution_file_variety == "Debian"
|
|
|
|
|
- ntp_service_install
|
|
|
|
|
tags: [ 'packages', 'ntp' ]
|
|
|
|
|
|
|
|
|
|
- block:
|
|
|
|
|
- name: Install the ntpd server
|
|
|
|
|
- name: Install the ntpd server on CentOS <= 7
|
|
|
|
|
yum: pkg=ntp state=present
|
|
|
|
|
|
|
|
|
|
- name: Install the ntp configuration.
|
|
|
|
@ -39,5 +41,20 @@
|
|
|
|
|
when: firewalld_enabled | bool
|
|
|
|
|
tags: [ 'packages', 'ntp', 'firewall', 'iptables_rules' ]
|
|
|
|
|
|
|
|
|
|
when: ansible_distribution_file_variety == "RedHat"
|
|
|
|
|
when:
|
|
|
|
|
- ansible_distribution_file_variety == "RedHat"
|
|
|
|
|
- ansible_distribution_major_version <= 7
|
|
|
|
|
- ntp_service_install
|
|
|
|
|
tags: [ 'packages', 'ntp' ]
|
|
|
|
|
|
|
|
|
|
- block:
|
|
|
|
|
- name: Install the ntpd server on CentOS >= 8
|
|
|
|
|
ansible.builtin.dnf:
|
|
|
|
|
pkg: chrony
|
|
|
|
|
state: present
|
|
|
|
|
|
|
|
|
|
when:
|
|
|
|
|
- ansible_distribution_file_variety == "RedHat"
|
|
|
|
|
- ansible_distribution_major_version >= 8
|
|
|
|
|
- ntp_service_install
|
|
|
|
|
tags: [ 'packages', 'ntp' ]
|
|
|
|
|