-
Notifications
You must be signed in to change notification settings - Fork 0
/
rootio-components.yml
67 lines (50 loc) · 1.91 KB
/
rootio-components.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
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
---
- name: Install Rootio components from Github
hosts: raspis
become: yes
vars_files:
- vars/rootio_vars.yml
tasks:
- name: make the installation dir
file:
path: "{{ twinkle_settings.event_handler_script_dir }}"
state: directory
recurse: yes
mode: 055
- name: install twinkle script
shell: cd /usr/src && rm -rf twinkle && git clone https://github.com/rootio/twinkle.git && cp twinkle/Handler.py "{{ twinkle_settings.event_handler_script_dir }}/" && rm -rf /usr/src/twinkle
- name: install serial driver for Java
apt: name=librxtx-java
- name: make the dir for the RootIO jar
file:
path: "{{ app_settings.installation_dir }}"
state: directory
mode: 055
- name: install RootIO Jar
shell: cd "{{ app_settings.installation_dir }}" && wget https://github.com/judelove/rootio-local/releases/latest/download/rootio-local.jar
- name: create the RootIO configuration dir
file:
path: "{{ app_settings.configuration_dir }}"
state: directory
- name: copy the RootIO configuration over.
template:
src: templates/conf/rootio.j2
dest: "{{ app_settings.configuration_dir }}/rootio.conf"
- name: create RootIO service script
template:
src: templates/service/RootioService.j2
dest: "{{ service_settings.script_dir }}/RootioService.sh"
mode: a+x
- name: create RootIO service configuration
template:
src: templates/service/rootio.service.j2
dest: "{{ service_settings.service_dir }}/rootio.service"
- name: enable the service to start on reboots
shell: systemctl enable rootio
- name: configure RootIO service options
systemd:
daemon_reload: yes
- name: start the RootIO service
systemd:
state: started
name: rootio