database modif gitea

This commit is contained in:
vincent 2019-04-23 18:34:18 +02:00
parent a5d31da406
commit 63c532aef1
2 changed files with 12 additions and 1 deletions

View File

@ -19,3 +19,5 @@ ttrss_enable_gzip: true
# sql - logs to database, can be seen in Preferences -> System # sql - logs to database, can be seen in Preferences -> System
# '' - uses PHP logging, usually the http server error log # '' - uses PHP logging, usually the http server error log
ttrss_log_destination: "syslog" ttrss_log_destination: "syslog"
#
ttrss_SQl_target_file: /usr/share/webapps/tt-rss/schema/ttrss_schema_mysql.sql

View File

@ -13,6 +13,15 @@
collation: utf8_general_ci collation: utf8_general_ci
encoding: utf8 encoding: utf8
state: present state: present
register: ttrss_database_creation
- name: import DATA in database in case of creation
become: yes
mysql_db:
name: "{{ ttrss_db_name }}"
state: import
target: "{{ttrss_SQl_target_file}}"
when: ttrss_database_creation.changed == true and ttrss_SQl_target_file is defined
- name: "Ensure db user is present" - name: "Ensure db user is present"
become: yes become: yes