summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLars Wirzenius <liw@liw.fi>2023-04-30 16:23:51 +0300
committerLars Wirzenius <liw@liw.fi>2023-04-30 16:23:51 +0300
commit9a9d97f70f97dc0dcd7a2c9c34cc652bad0e961c (patch)
treef221256ec3895cf3d63ddb684a7811389ada63c8
parent82ed1c2a4e3423feb58927eb6d5c9915feb81817 (diff)
downloaddebian-ansible-9a9d97f70f97dc0dcd7a2c9c34cc652bad0e961c.tar.gz
sane-debian-system: install ntp if systemd-timesyncd isn't available
Sponsored-by: author
-rw-r--r--roles/sane_debian_system/tasks/env.yml9
1 files changed, 8 insertions, 1 deletions
diff --git a/roles/sane_debian_system/tasks/env.yml b/roles/sane_debian_system/tasks/env.yml
index e44aa41..eedd864 100644
--- a/roles/sane_debian_system/tasks/env.yml
+++ b/roles/sane_debian_system/tasks/env.yml
@@ -23,7 +23,14 @@
state: present
name:
- locales
- - systemd-timesyncd
+
+- name: install systemd-timesyncd or ntp
+ shell: |
+ if apt-cache show systemd-timesyncd > /dev/null; then
+ DEBIAN_FRONTEND=noninteractife apt-get install -y systemd-timesyncd
+ else
+ DEBIAN_FRONTEND=noninteractife apt-get install -y ntp
+ fi
- name: generate locales
locale_gen: