2019-06-02 00:04:33 +08:00
|
|
|
- block:
|
2021-04-06 20:03:42 +08:00
|
|
|
- name: stop and disable chronyd
|
2019-06-02 00:04:33 +08:00
|
|
|
service: name=chronyd state=stopped enabled=no
|
|
|
|
ignore_errors: true
|
2021-04-06 20:03:42 +08:00
|
|
|
|
|
|
|
- name: remove files and dirs
|
|
|
|
file: name={{ item }} state=absent
|
|
|
|
with_items:
|
|
|
|
- "/etc/chrony"
|
|
|
|
- "/var/lib/chrony"
|
|
|
|
- "/var/log/chrony"
|
|
|
|
- "/var/run/chrony"
|
|
|
|
- "/etc/systemd/system/chronyd.service"
|
2019-06-02 00:04:33 +08:00
|
|
|
when: "groups['chrony']|length > 0"
|