]> birchwood-abbey.net Git - Institute/commitdiff
Install, start and enable timesyncd on campus hosts.
authorMatt Birkholz <matt@birchwood-abbey.net>
Mon, 22 Dec 2025 15:50:32 +0000 (08:50 -0700)
committerMatt Birkholz <matt@birchwood-abbey.net>
Mon, 22 Dec 2025 15:50:32 +0000 (08:50 -0700)
The package is not installed with Debian 13.

README.org
roles_t/campus/tasks/main.yml

index c678c5a4a900e093079d3657e4da7242b7f8f1d2..1cbd6ffef193a43b356423dab7749a00fdf0a17d 100644 (file)
@@ -5380,12 +5380,29 @@ and file timestamps.
 #+CAPTION: [[file:roles_t/campus/tasks/main.yml][=roles_t/campus/tasks/main.yml=]]
 #+BEGIN_SRC conf :tangle roles_t/campus/tasks/main.yml
 
+- name: Install timesyncd.
+  become: yes
+  apt: pkg=systemd-timesyncd
+
 - name: Configure timesyncd.
   become: yes
   lineinfile:
     path: /etc/systemd/timesyncd.conf
     line: NTP=ntp.{{ domain_priv }}
   notify: Restart systemd-timesyncd.
+
+- name: Start timesyncd.
+  become: yes
+  systemd:
+    service: systemd-timesyncd
+    state: started
+  tags: actualizer
+
+- name: Enable timesyncd.
+  become: yes
+  systemd:
+    service: systemd-timesyncd
+    enabled: yes
 #+END_SRC
 
 #+CAPTION: [[file:roles_t/campus/handlers/main.yml][=roles_t/campus/handlers/main.yml=]]
index 88b2755b960514245c10965b04b1f3ddf6d482a8..bc991b1004291172954bf29e0a63084099e5d474 100644 (file)
   when: inventory_hostname != ansible_hostname
   tags: actualizer
 
+- name: Install timesyncd.
+  become: yes
+  apt: pkg=systemd-timesyncd
+
 - name: Configure timesyncd.
   become: yes
   lineinfile:
     line: NTP=ntp.{{ domain_priv }}
   notify: Restart systemd-timesyncd.
 
+- name: Start timesyncd.
+  become: yes
+  systemd:
+    service: systemd-timesyncd
+    state: started
+  tags: actualizer
+
+- name: Enable timesyncd.
+  become: yes
+  systemd:
+    service: systemd-timesyncd
+    enabled: yes
+
 - name: Add {{ ansible_user }} to system groups.
   become: yes
   user: