: BaC now deploy automatically

This commit is contained in:
VC
2025-02-28 19:16:52 +01:00
parent e889260e12
commit ceeef38cf8
4 changed files with 17 additions and 0 deletions

View File

@@ -10,6 +10,7 @@ web_hostname:
- host: o.libertus.eu
type: nextcloud
- host: blog.libertus.eu
type: bac
- host: mail.libertus.eu
type: roundcube
- host: perso.nintendojo.fr

View File

@@ -4,6 +4,7 @@
hosts: web1.dmz.mateu.be
diff: true
roles:
- bac
- roundcube
- shaarli
- freshrss

11
roles/bac/tasks/main.yml Normal file
View File

@@ -0,0 +1,11 @@
---
- name: Install BaC application
ansible.builtin.unarchive:
remote_src: true
src: "{{ bac_url }}"
dest: "{{ bac_home }}"
owner: root
group: www-data
mode: "a-rwx,u+rwX,g+rX"
extra_opts: ['--strip-components=1']

4
roles/bac/vars/main.yml Normal file
View File

@@ -0,0 +1,4 @@
---
bac_url: "https://giteu.be/hylobates/BaC/releases/download/tamerelol/public.tar.gz"
bac_access_url: "{{ web_hostname | selectattr('type', 'defined') | selectattr('type', '==', 'bac') | map(attribute='host') | first }}"
bac_home: "/srv/http/{{ bac_access_url }}"