diff options
Diffstat (limited to 'roles/common/tasks/ntp.yml')
-rw-r--r-- | roles/common/tasks/ntp.yml | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/roles/common/tasks/ntp.yml b/roles/common/tasks/ntp.yml index 60ffef9..2ff9e49 100644 --- a/roles/common/tasks/ntp.yml +++ b/roles/common/tasks/ntp.yml @@ -1,9 +1,12 @@ -- name: Install/Remove ntp - # TODO bullseye: install new package 'systemd-timesyncd' +- name: Remove ntp package apt: pkg=ntp state={{ state }} purge=yes vars: state: "{{ ('NTP_master' in group_names) | ternary('present', 'absent') }}" +- name: Install systemd-timesyncd package + apt: pkg=systemd-timesyncd state=present purge=yes + when: "'NTP_master' not in group_names" + - name: Create /etc/systemd/timesyncd.conf.d file: path=/etc/systemd/timesyncd.conf.d state=directory |