diff --git a/host_vars/collabora.ext.infra.auro.re.yml b/host_vars/collabora.ext.infra.auro.re.yml index 5758b24..10f44d9 100644 --- a/host_vars/collabora.ext.infra.auro.re.yml +++ b/host_vars/collabora.ext.infra.auro.re.yml @@ -10,4 +10,13 @@ ifupdown2__interfaces: gateways: "{{ ifupdown2__gateways.adm }}" collabora__server_name: office.auro.re + +collabora__post_allow_addrs: + - 2a09:6840:215::1:1 + - 45.66.111.206 + +collabora__wopi_groups: + - host: https://cloud.auro.re:443 + aliases: + - https://nextcloud.auro.re:443 ... diff --git a/playbooks/collabora.yml b/playbooks/collabora.yml index 515358b..20812de 100755 --- a/playbooks/collabora.yml +++ b/playbooks/collabora.yml @@ -1,7 +1,7 @@ #!/usr/bin/env ansible-playbook --- - hosts: - - collabora.pub.infra.auro.re + - collabora.ext.infra.auro.re roles: - collabora ... diff --git a/roles/collabora/defaults/main.yml b/roles/collabora/defaults/main.yml new file mode 100644 index 0000000..227b4d0 --- /dev/null +++ b/roles/collabora/defaults/main.yml @@ -0,0 +1,4 @@ +--- +collabora__post_allow_addrs: [] +collabora__wopi_groups: [] +... diff --git a/roles/collabora/templates/coolwsd.xml.j2 b/roles/collabora/templates/coolwsd.xml.j2 index c8388ea..edf886a 100644 --- a/roles/collabora/templates/coolwsd.xml.j2 +++ b/roles/collabora/templates/coolwsd.xml.j2 @@ -147,35 +147,16 @@ https://my.com/browser/a123... to https://my.com/my/sub/path/browser/a123... --> - 192\.168\.[0-9]{1,3}\.[0-9]{1,3} - ::ffff:192\.168\.[0-9]{1,3}\.[0-9]{1,3} - 127\.0\.0\.1 - ::ffff:127\.0\.0\.1 - ::1 - 172\.1[6789]\.[0-9]{1,3}\.[0-9]{1,3} - ::ffff:172\.1[6789]\.[0-9]{1,3}\.[0-9]{1,3} - 172\.2[0-9]\.[0-9]{1,3}\.[0-9]{1,3} - ::ffff:172\.2[0-9]\.[0-9]{1,3}\.[0-9]{1,3} - 172\.3[01]\.[0-9]{1,3}\.[0-9]{1,3} - ::ffff:172\.3[01]\.[0-9]{1,3}\.[0-9]{1,3} - 10\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3} - ::ffff:10\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3} +{% for addr in collabora__post_allow_addrs %} +{% if addr is ansible.utils.ipv6 %} + {{ addr | regex_escape }} +{% elif addr is ansible.utils.ipv4 %} + {{ addr | regex_escape }} + {{ '::ffff:' + addr | regex_escape }} +{% endif %} +{% endfor %} - 192\.168\.[0-9]{1,3}\.[0-9]{1,3} - ::ffff:192\.168\.[0-9]{1,3}\.[0-9]{1,3} - 127\.0\.0\.1 - ::ffff:127\.0\.0\.1 - ::1 - 172\.1[6789]\.[0-9]{1,3}\.[0-9]{1,3} - ::ffff:172\.1[6789]\.[0-9]{1,3}\.[0-9]{1,3} - 172\.2[0-9]\.[0-9]{1,3}\.[0-9]{1,3} - ::ffff:172\.2[0-9]\.[0-9]{1,3}\.[0-9]{1,3} - 172\.3[01]\.[0-9]{1,3}\.[0-9]{1,3} - ::ffff:172\.3[01]\.[0-9]{1,3}\.[0-9]{1,3} - 10\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3} - ::ffff:10\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3} - localhost @@ -240,16 +221,15 @@ 900 - - - - + +{% for group in collabora__wopi_groups %} + + {{ group.host }} +{% for alias in group.aliases | default([]) %} + {{ alias }} +{% endfor %} + +{% endfor %}