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

@ -16,4 +16,5 @@ supysonic_db_user: supysonic
supysonic_db_password: supysonic supysonic_db_password: supysonic
# Database name # Database name
supysonic_db_name: supysonic supysonic_db_name: supysonic
supysonic_log_level: INFO 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" - name: "Ensure database is present"
become: yes become: yes
@ -8,8 +8,15 @@
collation: utf8_general_ci collation: utf8_general_ci
encoding: utf8 encoding: utf8
state: present 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" - name: "Ensure db user is present"
become: yes become: yes
@ -97,12 +104,14 @@
- name: enable daemon service - name: enable daemon service
systemd: 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 enabled: true
state: started
become: yes become: yes
- name: enable supysonic service - name: enable supysonic service
systemd: 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: "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 enabled: true
state: started
become: yes 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 ; This prevents running too many scans when multiple changes are detected for a
; single file over a short time span. Default: 5 ; single file over a short time span. Default: 5
wait_delay = 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 ; Optional rotating log file for the scanner daemon. Logs to stderr if empty
log_file = /var/supysonic/supysonic-daemon.log log_file = /var/supysonic/supysonic-daemon.log