From: Matt Birkholz Date: Sat, 9 May 2026 21:39:12 +0000 (-0600) Subject: Restart CronD when the timezone changes. Do this on notebooks too. X-Git-Url: https://birchwood-abbey.net/git?a=commitdiff_plain;h=176aded237b4873bbc08091e30ed81442518787b;p=Network.git Restart CronD when the timezone changes. Do this on notebooks too. --- diff --git a/README.org b/README.org index 82f1e3f..0fc5c8a 100644 --- a/README.org +++ b/README.org @@ -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. diff --git a/playbooks/timezone.yml b/playbooks/timezone.yml index a3ec119..7fbc6c3 100644 --- a/playbooks/timezone.yml +++ b/playbooks/timezone.yml @@ -1,5 +1,5 @@ --- -- hosts: core, dvrs, tvrs, webtvs +- hosts: core, dvrs, tvrs, webtvs, notebooks tasks: - name: Get timezone. command: date '+%Z' @@ -21,6 +21,13 @@ 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.