|
@@ -0,0 +1,72 @@
|
|
1
|
+- name: Install Python
|
|
2
|
+ apt: pkg=python,python-setuptools,python-pip,python-dev
|
|
3
|
+
|
|
4
|
+- name: Install Python tools
|
|
5
|
+ apt: pkg=python-imaging,python-pycurl
|
|
6
|
+
|
|
7
|
+- name: Install build tools
|
|
8
|
+ apt: pkg=build-essential,git
|
|
9
|
+
|
|
10
|
+- name: Install Python libs
|
|
11
|
+ apt: pkg=libxml2-dev,libxslt-dev,python-imaging
|
|
12
|
+
|
|
13
|
+- name: Install Supervisor
|
|
14
|
+ apt: pkg=supervisor
|
|
15
|
+
|
|
16
|
+- name: Install CouchDB
|
|
17
|
+ apt: pkg=couchdb
|
|
18
|
+
|
|
19
|
+- name: Install Newebe
|
|
20
|
+ pip: name='git+https://github.com/gelnior/newebe.git#egg=newebe'
|
|
21
|
+
|
|
22
|
+- name: Add group Newebe
|
|
23
|
+ group: name=newebe
|
|
24
|
+
|
|
25
|
+- name: Add user Newebe
|
|
26
|
+ user: name=newebe shell=/bin/bash groups=newebe
|
|
27
|
+
|
|
28
|
+- name: Create Newebe Config folder
|
|
29
|
+ file: path=/usr/local/etc/newebe/ owner=newebe group=newebe state=directory
|
|
30
|
+
|
|
31
|
+- name: Create Newebe folder
|
|
32
|
+ file: path=/usr/local/var/newebe/ owner=newebe group=newebe state=directory
|
|
33
|
+
|
|
34
|
+- name: Create Newebe log folder
|
|
35
|
+ file: path=/usr/local/var/log/newebe/ owner=newebe group=newebe state=directory
|
|
36
|
+
|
|
37
|
+- name: Set Newebe config file
|
|
38
|
+ copy: src=config.yaml dest=/usr/local/etc/newebe/config.yaml owner=newebe group=newebe
|
|
39
|
+
|
|
40
|
+- name: Set Supervisor config file
|
|
41
|
+ copy: src=newebe.conf dest=/etc/supervisor/conf.d/newebe.conf
|
|
42
|
+
|
|
43
|
+- name: Set Newebe Supervisor config file
|
|
44
|
+ copy: src=supervisor.conf dest=/etc/supervisor/supervisor.conf
|
|
45
|
+
|
|
46
|
+- name: Reload Supervisor and start Newebe
|
|
47
|
+ command: /usr/bin/supervisorctl update
|
|
48
|
+
|
|
49
|
+- name: Ensure that newebe is started
|
|
50
|
+ supervisorctl: name=newebe state=started
|
|
51
|
+
|
|
52
|
+- name: Add mod_proxy module to Apache
|
|
53
|
+ raw: a2enmod proxy
|
|
54
|
+# When Ansible 1.6 will be available
|
|
55
|
+# apache2_module: state=present name=proxy
|
|
56
|
+
|
|
57
|
+- name: Add proxy_http module to Apache
|
|
58
|
+ raw: a2enmod proxy_http
|
|
59
|
+# When Ansible 1.6 will be available
|
|
60
|
+# apache2_module: state=present name=proxy_http
|
|
61
|
+#
|
|
62
|
+- name: Configure the Apache HTTP server for Newebe
|
|
63
|
+ template: src=etc_apache2_sites-available_newebe.j2
|
|
64
|
+ dest=/etc/apache2/sites-available/newebe
|
|
65
|
+ group=www-data
|
|
66
|
+ owner=www-data
|
|
67
|
+ notify: restart apache
|
|
68
|
+
|
|
69
|
+- name: Enable the site
|
|
70
|
+ command: a2ensite newebe
|
|
71
|
+ creates=/etc/apache2/sites-enabled/newebe
|
|
72
|
+ notify: restart apache
|