diff --git a/inventory/host_vars/web1.dmz.mateu.be.yml b/inventory/host_vars/web1.dmz.mateu.be.yml index 29703d2..92598ce 100644 --- a/inventory/host_vars/web1.dmz.mateu.be.yml +++ b/inventory/host_vars/web1.dmz.mateu.be.yml @@ -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 diff --git a/playbooks/webapps.yml b/playbooks/webapps.yml index 15c7716..95ef9de 100644 --- a/playbooks/webapps.yml +++ b/playbooks/webapps.yml @@ -4,6 +4,7 @@ hosts: web1.dmz.mateu.be diff: true roles: + - bac - roundcube - shaarli - freshrss diff --git a/roles/bac/tasks/main.yml b/roles/bac/tasks/main.yml new file mode 100644 index 0000000..9d88df8 --- /dev/null +++ b/roles/bac/tasks/main.yml @@ -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'] diff --git a/roles/bac/vars/main.yml b/roles/bac/vars/main.yml new file mode 100644 index 0000000..7411864 --- /dev/null +++ b/roles/bac/vars/main.yml @@ -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 }}"