optimisation

This commit is contained in:
vincent 2020-01-13 20:04:49 +01:00
parent 1197fb7523
commit 5304f21a49
3 changed files with 15 additions and 5 deletions

View File

@ -17,3 +17,4 @@ supysonic_db_password: supysonic
# Database name
supysonic_db_name: supysonic
supysonic_log_level: INFO
gitea_SQl_target_file: []

View File

@ -1,5 +1,5 @@
---
# tasks file for chainetv
# tasks file for supysonic
- name: "Ensure database is present"
become: yes
@ -8,8 +8,15 @@
collation: utf8_general_ci
encoding: utf8
state: present
register: ttrss_database_creation
register: supysonic_database_creation
- name: import DATA in database in case of creation
become: yes
mysql_db:
name: "{{ supysonic_db_name }}"
state: import
target: "{{supysonic_SQl_target_file}}"
when: supysonic_database_creation.changed == true and supysonic_SQl_target_file is defined
- name: "Ensure db user is present"
become: yes
@ -97,12 +104,14 @@
- name: enable daemon service
systemd:
name: "gunicorn-{{supysonic_name}}.service" # not required. Name of the service. When using in a chroot environment you always need to specify the full name i.e. (crond.service).
name: "{{supysonic_name}}-daemon.service" # not required. Name of the service. When using in a chroot environment you always need to specify the full name i.e. (crond.service).
enabled: true
state: started
become: yes
- name: enable supysonic service
systemd:
name: "gunicorn-{{supysonic_name}}.service" # not required. Name of the service. When using in a chroot environment you always need to specify the full name i.e. (crond.service).
enabled: true
state: started
become: yes

View File

@ -35,7 +35,7 @@ log_level = {{supysonic_log_level}}
; This prevents running too many scans when multiple changes are detected for a
; single file over a short time span. Default: 5
wait_delay = 5
socket = /var/supysonic/supysonic.sock
socket = /var/run/supysonic.sock
; Optional rotating log file for the scanner daemon. Logs to stderr if empty
log_file = /var/supysonic/supysonic-daemon.log