Fix timezone.pl playbook. Add webtvs host group.
authorMatt Birkholz <matt@birchwood-abbey.net>
Sun, 21 Apr 2024 20:37:01 +0000 (14:37 -0600)
committerMatt Birkholz <matt@birchwood-abbey.net>
Sun, 21 Apr 2024 20:37:01 +0000 (14:37 -0600)
Run timezone.pl play on webtvs as well as Core, DVRs and TVRs.

README.org
abbey
hosts
playbooks/timezone.yml

index 89ae3882390d98e0a0b7abfdf1f2096b1e2b1160..cfd03fe0af61273a2d4321d8b6dcf1dd057529ae 100644 (file)
@@ -3189,6 +3189,11 @@ all:
     tvrs:
       hosts:
         dantooine:
+    webtvs:
+      hosts:
+        kessel:
+        devaron:
+        kamino:
     notebooks:
       hosts:
         endor:
@@ -3449,7 +3454,7 @@ if ($ARGV[0] eq "tz") {
 #+CAPTION: [[file:playbooks/timezone.yml][=playbooks/timezone.yml=]]
 #+BEGIN_SRC conf :tangle playbooks/timezone.yml
 ---
-- hosts: core, dvrs, tvrs
+- hosts: core, dvrs, tvrs, webtvs
   tasks:
   - name: Update timezone.
     become: yes
@@ -3464,7 +3469,7 @@ if ($ARGV[0] eq "tz") {
     become: yes
     systemd:
       service: "{{ item }}"
-      restarted: yes
+      state: restarted
     loop: [ mysql, zoneminder ]
     when: new_tz.changed
 
@@ -3474,7 +3479,7 @@ if ($ARGV[0] eq "tz") {
     become: yes
     systemd:
       service: "{{ item }}"
-      restarted: yes
+      state: restarted
     loop: [ mysql, mythtv-backend ]
     when: new_tz.changed
 
@@ -3502,7 +3507,7 @@ if ($ARGV[0] eq "tz") {
 
 #+CAPTION: [[file:abbey][=abbey=]]
 #+BEGIN_SRC perl :tangle abbey
-my $ops = "config,new,old,pass,client,upgrade,reboots,versions";
+my $ops = "config,new,old,pass,client,upgrade,reboots,versions,tz";
 die "usage: $0 [$ops]\n";
 #+END_SRC
 
diff --git a/abbey b/abbey
index 779eab4f1cb05710843f9140a2a45641186a6dc5..8deda6b4263ec979662a27f5b0371c9b857d36cb 100755 (executable)
--- a/abbey
+++ b/abbey
@@ -44,5 +44,5 @@ if ($ARGV[0] eq "tz") {
        "playbooks/timezone.yml");
 }
 
-my $ops = "config,new,old,pass,client,upgrade,reboots,versions";
+my $ops = "config,new,old,pass,client,upgrade,reboots,versions,tz";
 die "usage: $0 [$ops]\n";
diff --git a/hosts b/hosts
index 065a52c0222e709d9fdd5f8a72ba19fa7659ffc9..e2e3728dbf23c16551f153627ec887cb745b8b4b 100644 (file)
--- a/hosts
+++ b/hosts
@@ -55,6 +55,11 @@ all:
     tvrs:
       hosts:
         dantooine:
+    webtvs:
+      hosts:
+        kessel:
+        devaron:
+        kamino:
     notebooks:
       hosts:
         endor:
index db889c08b055227ae5d8be9964779444715fe9c8..d88f6fc40aa252a64fea684e45ed163a68223ee6 100644 (file)
@@ -1,5 +1,5 @@
 ---
-- hosts: core, dvrs, tvrs
+- hosts: core, dvrs, tvrs, webtvs
   tasks:
   - name: Update timezone.
     become: yes
@@ -14,7 +14,7 @@
     become: yes
     systemd:
       service: "{{ item }}"
-      restarted: yes
+      state: restarted
     loop: [ mysql, zoneminder ]
     when: new_tz.changed
 
@@ -24,7 +24,7 @@
     become: yes
     systemd:
       service: "{{ item }}"
-      restarted: yes
+      state: restarted
     loop: [ mysql, mythtv-backend ]
     when: new_tz.changed