forked from danielballan/caproto-rpi
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathhats.yml
46 lines (40 loc) · 1018 Bytes
/
hats.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
- hosts: battery-powered
tasks:
- name: Make /opt/iocs
file:
path: /opt/iocs
state: directory
mode: 755
become: yes
- name: Copy IOC scripts.
copy:
src: iocs/{{ item }}
dest: /opt/iocs/{{ item }}
with_items:
- hat.py
become: yes
notify:
- restart hat
- name: Template supervisor configuration for IOCs.
template:
src: supervisor_config/{{ item }}.conf
dest: /etc/supervisor/conf.d/{{ item }}.conf
with_items:
- hat.py
become: yes
notify:
- reread supervisord
- update supervisord
handlers:
- name: restart supervisord
service: name=supervisor state=restarted
become: yes
- name: reread supervisord
command: supervisorctl reread
become: yes
- name: update supervisord
command: supervisorctl update
become: yes
- name: restart hat
command: supervisorctl restart hat
become: yes