Remove the ntp package when we do not want it.
This commit is contained in:
parent
de6e4f7b2e
commit
c29608f849
|
@ -11,8 +11,10 @@
|
||||||
service: name=ntp state=started enabled=yes
|
service: name=ntp state=started enabled=yes
|
||||||
when: ntp_service_enabled | bool
|
when: ntp_service_enabled | bool
|
||||||
|
|
||||||
- name: Ensure that the ntp server is stopped and disabled
|
- name: Ensure that the ntp package is not installed
|
||||||
service: name=ntp state=stopped enabled=no
|
ansible.builtin.apt:
|
||||||
|
pkg: ntp
|
||||||
|
state: absent
|
||||||
when: not ntp_service_enabled | bool
|
when: not ntp_service_enabled | bool
|
||||||
|
|
||||||
when:
|
when:
|
||||||
|
@ -32,8 +34,10 @@
|
||||||
service: name=ntpd state=started enabled=yes
|
service: name=ntpd state=started enabled=yes
|
||||||
when: ntp_service_enabled | bool
|
when: ntp_service_enabled | bool
|
||||||
|
|
||||||
- name: Ensure that the ntpd server is stopped and disabled
|
- name: Ensure that the ntpd package is absent when not required
|
||||||
service: name=ntpd state=stopped enabled=no
|
ansible.builtin.yum:
|
||||||
|
pkg: ntp
|
||||||
|
state: present
|
||||||
when: not ntp_service_enabled | bool
|
when: not ntp_service_enabled | bool
|
||||||
|
|
||||||
- name: Manage the ntp firewalld rules in the {{ firewalld_default_zone }} zone
|
- name: Manage the ntp firewalld rules in the {{ firewalld_default_zone }} zone
|
||||||
|
|
Loading…
Reference in New Issue