system-config/playbooks/roles/gitea/tasks/proxy.yaml
James E. Blair 2a697f8ecd Serve matrix well-known files from apache
So that we can set the CORS header

Change-Id: I49eab2bda9a6b636a30384f7590c765079d31b20
2021-08-20 22:03:45 -07:00

61 lines
1.2 KiB
YAML

- name: Install apache2
apt:
name:
- apache2
- apache2-utils
state: present
- name: Apache modules
apache2_module:
state: present
name: "{{ item }}"
loop:
- rewrite
- proxy
- proxy_http
- ssl
- headers
- name: Copy apache config
template:
src: gitea.vhost.j2
dest: /etc/apache2/sites-enabled/000-default.conf
owner: root
group: root
mode: 0644
notify: gitea Reload apache2
- name: Copy apache tuning
copy:
src: apache-connection-tuning
dest: /etc/apache2/conf-enabled/connection-tuning.conf
owner: root
group: root
mode: 0644
notify: gitea Restart apache2
- name: Create matrix well-known directory
file:
path: /var/www/opendev.org/.well-known/matrix
state: directory
owner: root
group: root
mode: 0775
recurse: yes
- name: Copy matrix client config
copy:
src: matrix-client
dest: /var/www/opendev.org/.well-known/matrix/client
owner: root
group: root
mode: 0644
- name: Copy matrix server config
copy:
src: matrix-server
dest: /var/www/opendev.org/.well-known/matrix/server
owner: root
group: root
mode: 0644