diff --git a/roles/freshrss/tasks/freshrss.yml b/roles/freshrss/tasks/freshrss.yml index 36600c0..20770e3 100644 --- a/roles/freshrss/tasks/freshrss.yml +++ b/roles/freshrss/tasks/freshrss.yml @@ -5,11 +5,14 @@ pattern: index.html register: previous_install +- set_fact: + skip_install: "{{ previous_install.matched == 1 }}" + - name: download freshrss tarball get_url: url: "{{ freshrss_url }}" dest: /tmp/ - when: not previous_install.matched == 0 + when: not skip_install - name: unarchive file unarchive: @@ -18,7 +21,7 @@ dest: /tmp owner: "{{ lighttpd_user }}" group: "{{ lighttpd_group }}" - when: not previous_install.matched == 0 + when: not skip_install - name: copy files to docroot copy: @@ -27,18 +30,20 @@ dest: "{{ docroot }}/freshrss/" owner: "{{ lighttpd_user }}" group: "{{ lighttpd_group }}" - when: not previous_install.matched == 0 + when: not skip_install - name: reset docroot to freshrss/p lineinfile: path: /etc/lighttpd/lighttpd.conf regexp: '^server.document-root' line: server.document-root = "{{ freshrss_dir }}/p" + when: not skip_install - name: restart lighttpd service: name: lighttpd state: restarted + when: not skip_install # # install backup data