summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRomain Porte <microjoe@microjoe.org>2020-05-08 21:52:11 +0200
committerRomain Porte <microjoe@microjoe.org>2020-05-08 21:52:11 +0200
commit2881b6809efeafa9c1e4283ad3abeb26e7f2e1a6 (patch)
tree719cdfcfced62314845d246ddce9d317c4a58916
parentbc595db8d9bdebdf6b50f8bf40dad176b875c085 (diff)
downloadMicroJoe.ttrss-2881b6809efeafa9c1e4283ad3abeb26e7f2e1a6.tar.gz
MicroJoe.ttrss-2881b6809efeafa9c1e4283ad3abeb26e7f2e1a6.zip
fix database import problem
-rw-r--r--defaults/main.yml2
-rw-r--r--tasks/main.yml12
2 files changed, 10 insertions, 4 deletions
diff --git a/defaults/main.yml b/defaults/main.yml
index e56debe..7ea87ea 100644
--- a/defaults/main.yml
+++ b/defaults/main.yml
@@ -3,7 +3,7 @@
ttrss_repository: https://git.tt-rss.org/fox/tt-rss.git
ttrss_version: master
-ttrss_base: /var/www/ttrss
+ttrss_base: "/var/www/{{ nginx_domain }}"
ttrss_user: ttrss
ttrss_group: ttrss
diff --git a/tasks/main.yml b/tasks/main.yml
index 0bc8b98..a343744 100644
--- a/tasks/main.yml
+++ b/tasks/main.yml
@@ -58,9 +58,6 @@
encoding: UTF-8
template: template0
-# TODO: We currently have to remove the config.php file and enter the config
-# by hand in order to initialize the SQL database
-
- name: Install ttrss configuration file
template:
src: templates/config.php.j2
@@ -68,6 +65,15 @@
owner: ttrss
group: www-data
+- name: Import database schema
+ become: yes
+ become_user: "{{ ttrss_user }}"
+ postgresql_query:
+ db: "{{ ttrss_db_name }}"
+ login_user: "{{ ttrss_db_user }}"
+ path_to_script: "{{ ttrss_base }}/schema/ttrss_schema_pgsql.sql"
+ when: ttrss_install
+
- name: Install nginx configuration file {{ nginx_filename }}
template:
src: templates/nginx.j2