diff --git a/roles/calibre/tasks/main.yml b/roles/calibre/tasks/main.yml index 4c1be9584..73eba3a38 100644 --- a/roles/calibre/tasks/main.yml +++ b/roles/calibre/tasks/main.yml @@ -22,6 +22,12 @@ with_items: - { src: 'calibre-serve.service.j2', dest: '/etc/systemd/system/calibre-serve.service', mode: '0644'} - { src: 'calibre.conf', dest: '/etc/{{ apache_config_dir }}', mode: '0644'} + register: calibre_config + +- name: Forcing systemd to reread configs + systemd: + daemon_reload: yes + when: calibre_config.changed # 2. STOP CALIBRE SERVICE IF IT EXISTS (REQUIRED FOR DB ACTIVITY...AND IF not calibre_enabled) @@ -51,7 +57,7 @@ include_tasks: create-db.yml when: not calibre_db.stat.exists -# 4. WRAP UP: CALIBRE SERVICE, http://box/books ETC +# 4. WRAP UP: ENABLE CALIBRE SERVICE, http://box/books ETC # http://box:8080 & http://box:8080/mobile WORK BUT OTHER URL'S LIKE http://box/books ARE A MESS (BOOKS RARELY DISPLAY) - name: Create calibre.conf link for UNTESTED http://box/books etc (debuntu) @@ -76,6 +82,11 @@ #async: 900 #poll: 5 +- name: Forcing apache to reread configs + service: + name: "{{ apache_service }}" + state: reloaded + - name: Add 'calibre' to list of services at /etc/iiab/iiab.ini ini_file: dest: "{{ service_filelist }}" @@ -94,4 +105,4 @@ - option: port value: "{{ calibre_port }}" - option: enabled - value: "{{ calibre_enabled }}" + value: "{{ calibre_enabled }}" \ No newline at end of file