|
@@ -3,8 +3,19 @@
|
3
|
3
|
dest=/var/www/selfoss
|
4
|
4
|
accept_hostkey=yes
|
5
|
5
|
|
6
|
|
-- name: Set selfoss permissions
|
7
|
|
- action: file owner=www-data group=www-data path=/var/www/selfoss recurse=yes state=directory
|
|
6
|
+- name: Set selfoss ownership
|
|
7
|
+ action: file owner=root group=www-data path=/var/www/selfoss recurse=yes state=directory
|
|
8
|
+
|
|
9
|
+# only data/cache, data/favicons, data/logs, data/thumbnails, data/sqlite public/ should be writeable by httpd
|
|
10
|
+- name: Set selfoss permission
|
|
11
|
+ action: file path=/var/www/selfoss/{{ item }} permission=775
|
|
12
|
+ with_items:
|
|
13
|
+ - data/cache
|
|
14
|
+ - data/favicons
|
|
15
|
+ - data/logs
|
|
16
|
+ - data/thumbnails
|
|
17
|
+ - data/sqlite
|
|
18
|
+ - public
|
8
|
19
|
|
9
|
20
|
- name: Install selfoss dependencies
|
10
|
21
|
apt: pkg={{ item }} state=present
|
|
@@ -20,7 +31,7 @@
|
20
|
31
|
postgresql_db: login_host=localhost login_user={{ db_admin_username }} login_password="{{ db_admin_password }}" name={{ selfoss_db_database }} state=present owner={{ selfoss_db_username }}
|
21
|
32
|
|
22
|
33
|
- name: Install selfoss config.ini
|
23
|
|
- template: src=var_www_selfoss_config.ini.j2 dest=/var/www/selfoss/config.ini group=www-data owner=www-data
|
|
34
|
+ template: src=var_www_selfoss_config.ini.j2 dest=/var/www/selfoss/config.ini group=www-data owner=root
|
24
|
35
|
|
25
|
36
|
- name: Enable Apache rewrite module
|
26
|
37
|
command: a2enmod rewrite creates=/etc/apache2/mods-enabled/rewrite.load
|