ansible-synapse/roles/setup-synapse/tasks/config_nginx.yml

31 lines
696 B
YAML

---
- name: Install NGINX
apt:
name: nginx
state: present
- name: Configure Nginx Config for Matrix Synapse
template:
src: nginx.conf.j2
dest: "/etc/nginx/sites-available/{{ server_name }}"
mode: '0644'
notify: Restart Nginx
- name: Create a Symbolic Link for Nginx Config
file:
src: "/etc/nginx/sites-available/{{ server_name }}"
dest: "/etc/nginx/sites-enabled/{{ server_name }}"
state: link
- name: Remove default Nginx Config
file:
path: /etc/nginx/sites-enabled/default
state: absent
notify: Restart Nginx
- name: Remove 'matrix' Nginx Config
file:
path: /etc/nginx/sites-enabled/matrix
state: absent
notify: Restart Nginx