Improve - Remove default crony pool entries
The following task in tasks/10_system_vetting.yml could be improved:
- name: "Remove default crony pool entries"
ansible.builtin.lineinfile:
path: "{{ common_chrony_conf }}"
state: "absent"
regexp: "^pool .*"
notify:
- "Restart chrony"
- "Reload chrony sources"
I think that could be changed to the following in order to not make changes on every Ansible run:
- name: "Remove default chrony pool entries"
ansible.builtin.lineinfile:
path: "{{ common_chrony_conf }}"
state: "absent"
regexp: "^pool.*.pool.ntp.org"
notify:
- "Restart chrony"
- "Reload chrony sources"
Note also that chrony
is misspelled in the task name.
Edited by Bill Glick