Fix the install check of the EL related tasks.
This commit is contained in:
parent
38bffed229
commit
e1a7097a3d
|
@ -1,5 +1,9 @@
|
|||
---
|
||||
- name: ntp-el | Manage the NTP service in the EL distributions
|
||||
when:
|
||||
- ansible_distribution_major_version is version_compare('7', '<=')
|
||||
- ntp_service_enabled
|
||||
tags: [ 'packages', 'ntp' ]
|
||||
block:
|
||||
- name: ntp-el | Install the ntpd server on CentOS <= 7
|
||||
yum: pkg=ntp state=present
|
||||
|
@ -23,19 +27,14 @@
|
|||
when: firewalld_enabled
|
||||
tags: [ 'packages', 'ntp', 'firewall', 'iptables_rules' ]
|
||||
|
||||
when:
|
||||
- ansible_distribution_major_version is version_compare('7', '<=')
|
||||
- ntp_service_install
|
||||
tags: [ 'packages', 'ntp' ]
|
||||
|
||||
- name: ntp-el | Manage the NTP service in the EL distributions
|
||||
when:
|
||||
- ansible_distribution_major_version is version_compare('8', '>=')
|
||||
- ntp_service_enabled
|
||||
tags: [ 'packages', 'ntp' ]
|
||||
block:
|
||||
- name: ntp-el |Install the Chrony server on CentOS >= 8
|
||||
ansible.builtin.dnf:
|
||||
pkg: chrony
|
||||
state: present
|
||||
|
||||
when:
|
||||
- ansible_distribution_major_version is version_compare('8', '>=')
|
||||
- ntp_service_install
|
||||
tags: [ 'packages', 'ntp' ]
|
||||
|
|
Loading…
Reference in New Issue