|
@@ -1,87 +0,0 @@
|
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
|
|
- tags:
|
19
|
|
- - dependencies
|
20
|
|
-
|
21
|
|
-- name: Install Newebe
|
22
|
|
- pip: name='git+https://github.com/gelnior/newebe.git#egg=newebe'
|
23
|
|
-
|
24
|
|
-- name: Add group Newebe
|
25
|
|
- group: name=newebe
|
26
|
|
-
|
27
|
|
-- name: Add user Newebe
|
28
|
|
- user: name=newebe groups=newebe shell=/usr/sbin/nologin
|
29
|
|
-
|
30
|
|
-- name: Create Newebe Config folder
|
31
|
|
- file: path=/usr/local/etc/newebe/
|
32
|
|
- owner=newebe
|
33
|
|
- group=newebe
|
34
|
|
- state=directory
|
35
|
|
-
|
36
|
|
-- name: Create Newebe folder
|
37
|
|
- file: path=/usr/local/var/newebe/
|
38
|
|
- owner=newebe
|
39
|
|
- group=newebe
|
40
|
|
- state=directory
|
41
|
|
-
|
42
|
|
-- name: Create Newebe log folder
|
43
|
|
- file: path=/usr/local/var/log/newebe/
|
44
|
|
- owner=newebe
|
45
|
|
- group=newebe
|
46
|
|
- state=directory
|
47
|
|
-
|
48
|
|
-- name: Set Newebe config file
|
49
|
|
- template: src=usr_local_etc_newebe_config.j2
|
50
|
|
- dest=/usr/local/etc/newebe/config.yaml
|
51
|
|
- owner=newebe
|
52
|
|
- group=newebe
|
53
|
|
-
|
54
|
|
-- name: Set Supervisor config file
|
55
|
|
- copy: src=newebe.conf dest=/etc/supervisor/conf.d/newebe.conf
|
56
|
|
-
|
57
|
|
-- name: Set Newebe Supervisor config file
|
58
|
|
- copy: src=supervisor.conf dest=/etc/supervisor/supervisor.conf
|
59
|
|
- notify: restart supervisor
|
60
|
|
-
|
61
|
|
-- name: Ensure Supervisor is running
|
62
|
|
- service: name=supervisor state=running
|
63
|
|
-
|
64
|
|
-- name: Ensure that newebe is started
|
65
|
|
- supervisorctl: name=newebe state=started
|
66
|
|
-
|
67
|
|
-- name: Add mod_proxy module to Apache
|
68
|
|
- apache2_module: state=present name=proxy
|
69
|
|
-
|
70
|
|
-- name: Add proxy_http module to Apache
|
71
|
|
- apache2_module: state=present name=proxy_http
|
72
|
|
-
|
73
|
|
-- name: Rename existing Apache newebe virtualhost
|
74
|
|
- command: mv /etc/apache2/sites-available/newebe /etc/apache2/sites-available/newebe.conf removes=/etc/apache2/sites-available/newebe
|
75
|
|
-
|
76
|
|
-- name: Remove old sites-enabled/newebe symlink (new one will be created by a2ensite)
|
77
|
|
- file: path=/etc/apache2/sites-enabled/newebe state=absent
|
78
|
|
-
|
79
|
|
-- name: Configure the Apache HTTP server for Newebe
|
80
|
|
- template: src=etc_apache2_sites-available_newebe.j2
|
81
|
|
- dest=/etc/apache2/sites-available/newebe.conf
|
82
|
|
- group=root
|
83
|
|
- owner=root
|
84
|
|
-
|
85
|
|
-- name: Enable the site
|
86
|
|
- command: a2ensite newebe.conf creates=/etc/apache2/sites-enabled/newebe.conf
|
87
|
|
- notify: restart apache
|