|
@@ -1,85 +1 @@
|
1
|
|
-- name: Install Dependencies
|
2
|
|
- apt: pkg={{ item }}
|
3
|
|
- with_items:
|
4
|
|
- - build-essential
|
5
|
|
- - couchdb
|
6
|
|
- - git
|
7
|
|
- - libxml2-dev
|
8
|
|
- - libxslt-dev
|
9
|
|
- - python
|
10
|
|
- - python-dev
|
11
|
|
- - python-imaging
|
12
|
|
- - python-imaging
|
13
|
|
- - python-pip
|
14
|
|
- - python-pycurl
|
15
|
|
- - python-setuptools
|
16
|
|
- - python-lxml
|
17
|
|
- - supervisor
|
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 groups=newebe shell=/usr/sbin/nologin
|
27
|
|
-
|
28
|
|
-- name: Create Newebe Config folder
|
29
|
|
- file: path=/usr/local/etc/newebe/
|
30
|
|
- owner=newebe
|
31
|
|
- group=newebe
|
32
|
|
- state=directory
|
33
|
|
-
|
34
|
|
-- name: Create Newebe folder
|
35
|
|
- file: path=/usr/local/var/newebe/
|
36
|
|
- owner=newebe
|
37
|
|
- group=newebe
|
38
|
|
- state=directory
|
39
|
|
-
|
40
|
|
-- name: Create Newebe log folder
|
41
|
|
- file: path=/usr/local/var/log/newebe/
|
42
|
|
- owner=newebe
|
43
|
|
- group=newebe
|
44
|
|
- state=directory
|
45
|
|
-
|
46
|
|
-- name: Set Newebe config file
|
47
|
|
- template: src=usr_local_etc_newebe_config.j2
|
48
|
|
- dest=/usr/local/etc/newebe/config.yaml
|
49
|
|
- owner=newebe
|
50
|
|
- group=newebe
|
51
|
|
-
|
52
|
|
-- name: Set Supervisor config file
|
53
|
|
- copy: src=newebe.conf dest=/etc/supervisor/conf.d/newebe.conf
|
54
|
|
-
|
55
|
|
-- name: Set Newebe Supervisor config file
|
56
|
|
- copy: src=supervisor.conf dest=/etc/supervisor/supervisor.conf
|
57
|
|
- notify: restart supervisor
|
58
|
|
-
|
59
|
|
-- name: Ensure Supervisor is running
|
60
|
|
- service: name=supervisor state=running
|
61
|
|
-
|
62
|
|
-- name: Ensure that newebe is started
|
63
|
|
- supervisorctl: name=newebe state=started
|
64
|
|
-
|
65
|
|
-- name: Add mod_proxy module to Apache
|
66
|
|
- apache2_module: state=present name=proxy
|
67
|
|
-
|
68
|
|
-- name: Add proxy_http module to Apache
|
69
|
|
- apache2_module: state=present name=proxy_http
|
70
|
|
-
|
71
|
|
-- name: Rename existing Apache newebe virtualhost
|
72
|
|
- command: mv /etc/apache2/sites-available/newebe /etc/apache2/sites-available/newebe.conf removes=/etc/apache2/sites-available/newebe
|
73
|
|
-
|
74
|
|
-- name: Remove old sites-enabled/newebe symlink (new one will be created by a2ensite)
|
75
|
|
- file: path=/etc/apache2/sites-enabled/newebe state=absent
|
76
|
|
-
|
77
|
|
-- name: Configure the Apache HTTP server for Newebe
|
78
|
|
- template: src=etc_apache2_sites-available_newebe.j2
|
79
|
|
- dest=/etc/apache2/sites-available/newebe.conf
|
80
|
|
- group=root
|
81
|
|
- owner=root
|
82
|
|
-
|
83
|
|
-- name: Enable the site
|
84
|
|
- command: a2ensite newebe.conf creates=/etc/apache2/sites-enabled/newebe.conf
|
85
|
|
- notify: restart apache
|
|
1
|
+- include: newebe.yml tags=newebe
|