From ce159eb104c0fcb9890e7287e24b8e33e9e591d6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?St=C3=A9phane=20Graber?= Date: Thu, 23 Jan 2025 18:41:50 -0500 Subject: [PATCH] ansible/environment: Install timesyncd MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Stéphane Graber --- ansible/books/environment.yaml | 16 +++++++++++++++- 1 file changed, 15 insertions(+), 1 deletion(-) diff --git a/ansible/books/environment.yaml b/ansible/books/environment.yaml index fb577fa..b67395e 100644 --- a/ansible/books/environment.yaml +++ b/ansible/books/environment.yaml @@ -2,9 +2,23 @@ - name: Environment checks hosts: all order: shuffle + gather_facts: yes + gather_subset: + - "distribution_release" any_errors_fatal: true - gather_facts: false tasks: + - name: Install systemd-timesyncd + ansible.builtin.package: + name: + - systemd-timesyncd + state: present + + - name: Enable systemd-timesyncd + systemd: + enabled: yes + name: systemd-timesyncd + state: started + - name: Verify NTP successfully synced shell: cmd: timedatectl timesync-status