: add shaarli to managed webapps

This commit is contained in:
VC
2025-02-14 11:13:20 +01:00
parent 6f87eb99c6
commit d7285bccd7
4 changed files with 34 additions and 0 deletions

View File

@@ -4,6 +4,7 @@ php_memory_limit: "512M"
web_hostname:
- host: fav.libertus.eu
type: shaarli
- host: rss.libertus.eu
- host: o.libertus.eu
type: nextcloud

View File

@@ -5,3 +5,4 @@
diff: true
roles:
- roundcube
- shaarli

View File

@@ -0,0 +1,25 @@
---
- name: Install Shaarli
ansible.builtin.unarchive:
remote_src: true
src: "{{ shaarli_url }}"
dest: "{{ shaarli_local_path }}"
owner: root
group: www-data
mode: "a-rwx,u+rwX,g+rX"
extra_opts: ['--strip-components=1']
exclude:
- "{{ shaarli_local_path }}/data"
- name: Check writable dirs
ansible.builtin.file:
state: directory
dest: "{{ shaarli_local_path }}/{{ item }}"
owner: root
group: www-data
mode: "g+w"
loop:
- "data"
- "tmp"
- "pagecache"

View File

@@ -0,0 +1,7 @@
---
shaarli_version: "0.14.0"
shaarli_url: "https://github.com/shaarli/Shaarli/releases/download/v{{ shaarli_version }}/shaarli-v{{ shaarli_version }}-full.tar.gz"
shaarli_access_url: "{{ web_hostname | selectattr('type', 'defined') | selectattr('type', '==', 'shaarli') | map(attribute='host') | first }}"
shaarli_local_path: "/srv/http/{{ shaarli_access_url }}"