]> birchwood-abbey.net Git - Network.git/commitdiff
Restart CronD when the timezone changes. Do this on notebooks too.
authorMatt Birkholz <matt@birchwood-abbey.net>
Sat, 9 May 2026 21:39:12 +0000 (15:39 -0600)
committerMatt Birkholz <matt@birchwood-abbey.net>
Sat, 9 May 2026 21:39:12 +0000 (15:39 -0600)
README.org
playbooks/timezone.yml

index 82f1e3fb51bb76a2015892f35f2e4c0d5a54a0d5..0fc5c8a66dc4aa71350ce5c0270af1395070cf3f 100644 (file)
@@ -3200,7 +3200,7 @@ if (defined $ARGV[0] && $ARGV[0] eq "tz") {
 #+CAPTION: [[file:playbooks/timezone.yml][=playbooks/timezone.yml=]]
 #+BEGIN_SRC conf :tangle playbooks/timezone.yml
 ---
-- hosts: core, dvrs, tvrs, webtvs
+- hosts: core, dvrs, tvrs, webtvs, notebooks
   tasks:
   - name: Get timezone.
     command: date '+%Z'
@@ -3222,6 +3222,13 @@ if (defined $ARGV[0] && $ARGV[0] eq "tz") {
     when: ansible_date_time.tz != zone.stdout
     register: new_tz
 
+  - name: Restart CronD.
+    become: yes
+    systemd:
+      service: cron
+      status: restarted
+    when: new_tz.changed
+
 - hosts: dvrs
   tasks:
   - name: Restart AgentDVR.
index a3ec119f29bdd66e4f8dee37f8eb46a40097cd0f..7fbc6c37a002f0818ef2d81a49a89c3637327fe1 100644 (file)
@@ -1,5 +1,5 @@
 ---
-- hosts: core, dvrs, tvrs, webtvs
+- hosts: core, dvrs, tvrs, webtvs, notebooks
   tasks:
   - name: Get timezone.
     command: date '+%Z'
     when: ansible_date_time.tz != zone.stdout
     register: new_tz
 
+  - name: Restart CronD.
+    become: yes
+    systemd:
+      service: cron
+      status: restarted
+    when: new_tz.changed
+
 - hosts: dvrs
   tasks:
   - name: Restart AgentDVR.