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