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
|
- 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:
|
block:
|
||||||
- name: ntp-el | Install the ntpd server on CentOS <= 7
|
- name: ntp-el | Install the ntpd server on CentOS <= 7
|
||||||
yum: pkg=ntp state=present
|
yum: pkg=ntp state=present
|
||||||
|
@ -23,19 +27,14 @@
|
||||||
when: firewalld_enabled
|
when: firewalld_enabled
|
||||||
tags: [ 'packages', 'ntp', 'firewall', 'iptables_rules' ]
|
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
|
- 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:
|
block:
|
||||||
- name: ntp-el |Install the Chrony server on CentOS >= 8
|
- name: ntp-el |Install the Chrony server on CentOS >= 8
|
||||||
ansible.builtin.dnf:
|
ansible.builtin.dnf:
|
||||||
pkg: chrony
|
pkg: chrony
|
||||||
state: present
|
state: present
|
||||||
|
|
||||||
when:
|
|
||||||
- ansible_distribution_major_version is version_compare('8', '>=')
|
|
||||||
- ntp_service_install
|
|
||||||
tags: [ 'packages', 'ntp' ]
|
|
||||||
|
|
Loading…
Reference in New Issue