ansible-roles/ntpd/tasks/main.yml
David Prevot 61f2096fad Allow more --check runs
Use “when: not ansible_check_mode” or “when <file>.stat.exists or not
ansible_check_mode” in order to provide a meaningful diff if possible.

This is an improvement from the previously reverted commit
1728eaee68.
2022-12-23 16:20:06 +01:00

25 lines
349 B
YAML

---
- name: Remove openntpd package
apt:
name: openntpd
state: absent
tags:
- ntp
- name: Install ntp package
apt:
name: ntp
state: present
tags:
- ntp
- name: Copy ntp config
template:
src: ntp.conf.j2
dest: /etc/ntp.conf
mode: "0644"
notify: restart ntp
tags:
- ntp
when: not ansible_check_mode