tvrs:
hosts:
dantooine:
+ webtvs:
+ hosts:
+ kessel:
+ devaron:
+ kamino:
notebooks:
hosts:
endor:
#+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
become: yes
systemd:
service: "{{ item }}"
- restarted: yes
+ state: restarted
loop: [ mysql, zoneminder ]
when: new_tz.changed
become: yes
systemd:
service: "{{ item }}"
- restarted: yes
+ state: restarted
loop: [ mysql, mythtv-backend ]
when: new_tz.changed
#+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
"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";
---
-- hosts: core, dvrs, tvrs
+- hosts: core, dvrs, tvrs, webtvs
tasks:
- name: Update timezone.
become: yes
become: yes
systemd:
service: "{{ item }}"
- restarted: yes
+ state: restarted
loop: [ mysql, zoneminder ]
when: new_tz.changed
become: yes
systemd:
service: "{{ item }}"
- restarted: yes
+ state: restarted
loop: [ mysql, mythtv-backend ]
when: new_tz.changed