-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathwebiopi.yml
63 lines (54 loc) · 1.47 KB
/
webiopi.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
- name: install python3
apt: >
name={{ item }}
state=present
update_cache=yes
cache_valid_time=3600
with_items:
- python3
- python3-pip
- python3-rpi.gpio
become: yes
- name: get webiopi
get_url: >
url=http://downloads.sourceforge.net/project/webiopi/WebIOPi-0.7.1.tar.gz
dest=/home/{{ ansible_user_id }}
- name: extract webiopi installer
unarchive: >
src=/home/{{ ansible_user_id }}/WebIOPi-0.7.1.tar.gz
dest=/home/{{ ansible_user_id }}/
copy=no
- name: get patch for RPi2
get_url: >
url=https://raw.githubusercontent.com/doublebind/raspi/master/webiopi-pi2bplus.patch
dest=/home/{{ ansible_user_id }}/WebIOPi-0.7.1/
- name: patch it
command: patch -p1 -i webiopi-pi2bplus.patch chdir=/home/{{ ansible_user_id }}/WebIOPi-0.7.1
- name: rewrite installer to silent install
lineinfile: >
dest=/home/{{ ansible_user_id }}/WebIOPi-0.7.1/setup.sh
regexp="read response"
line="response=n"
state=present
- name: install webiopi
command: /home/{{ ansible_user_id }}/WebIOPi-0.7.1/setup.sh
args:
chdir: /home/{{ ansible_user_id }}/WebIOPi-0.7.1
become: yes
- name: setting up webiopi config
template: >
src=config.j2
dest=/etc/webiopi/config
notify: restart webiopi
become: yes
- name: copy webiopi password
copy: >
src=passwd
dest=/etc/webiopi/passwd
notify: restart webiopi
become: yes
- name: enabled webiopi service
service: >
name=webiopi
enabled=yes
become: yes