|
@@ -0,0 +1,58 @@
|
|
1
|
+- name: Clone wallabag
|
|
2
|
+ git: repo=https://github.com/wallabag/wallabag.git
|
|
3
|
+ dest=/var/www/wallabag
|
|
4
|
+ version={{ wallabag_version }}
|
|
5
|
+
|
|
6
|
+- name: Install wallabag dependencies
|
|
7
|
+ apt: pkg={{ item }} state=present
|
|
8
|
+ with_items:
|
|
9
|
+ - php5
|
|
10
|
+ - php5-mcrypt
|
|
11
|
+ - php5-tidy
|
|
12
|
+ - php5-curl
|
|
13
|
+ - php5-pgsql
|
|
14
|
+
|
|
15
|
+- name: Create database user for wallabag
|
|
16
|
+ postgresql_user: login_host=localhost
|
|
17
|
+ login_user={{ db_admin_username }}
|
|
18
|
+ login_password="{{ db_admin_password }}"
|
|
19
|
+ name={{ wallabag_db_username }}
|
|
20
|
+ password="{{ wallabag_db_password }}"
|
|
21
|
+ state=present
|
|
22
|
+
|
|
23
|
+- name: Create database for wallabag
|
|
24
|
+ postgresql_db: login_host=localhost
|
|
25
|
+ login_user={{ db_admin_username }}
|
|
26
|
+ login_password="{{ db_admin_password }}"
|
|
27
|
+ name={{ wallabag_db_database }}
|
|
28
|
+ state=present
|
|
29
|
+ owner={{ wallabag_db_username }}
|
|
30
|
+
|
|
31
|
+- name: Build Composer
|
|
32
|
+ shell: curl -sS https://getcomposer.org/installer | php
|
|
33
|
+ chdir=/root
|
|
34
|
+ creates=/root/composer.phar
|
|
35
|
+
|
|
36
|
+- name: Initialize composer
|
|
37
|
+ command: php /root/composer.phar install
|
|
38
|
+ chdir=/var/www/wallabag
|
|
39
|
+ creates=/var/www/wallabag/vendor/autoload.php
|
|
40
|
+
|
|
41
|
+- name: Set wallabag permissions
|
|
42
|
+ file: owner=www-data
|
|
43
|
+ group=www-data
|
|
44
|
+ path=/var/www/wallabag
|
|
45
|
+ recurse=yes
|
|
46
|
+ state=directory
|
|
47
|
+
|
|
48
|
+- name: Configure the Apache HTTP server for wallabag
|
|
49
|
+ template: src=etc_apache2_sites-available_wallabag.j2
|
|
50
|
+ dest=/etc/apache2/sites-available/wallabag
|
|
51
|
+ group=www-data
|
|
52
|
+ owner=www-data
|
|
53
|
+ notify: restart apache
|
|
54
|
+
|
|
55
|
+- name: Enable the wallabag site
|
|
56
|
+ command: a2ensite wallabag
|
|
57
|
+ creates=/etc/apache2/sites-enabled/wallabag
|
|
58
|
+ notify: restart apache
|