Added: ejabberd config (WIP)

This commit is contained in:
Stupéflo 2024-05-23 19:13:11 +02:00
parent afde58b884
commit 85df91fee3
Signed by: stupeflo
GPG key ID: 873D883BD359DEE2
9 changed files with 346 additions and 37 deletions

View file

@ -1,22 +1,4 @@
---
- name: disable access logs
ansible.builtin.blockinfile:
path: "{{ nginx.paths.conf_d }}/10-access_log-disabled.conf"
block: |
access_log off;
create: true
- name: Create auto redirect to TLS
ansible.builtin.blockinfile:
path: "{{ nginx.paths.sites_available }}/redirect_to_https"
block: |
server {
listen 80 default_server;
server_name _;
return 301 https://$host$request_uri;
}
create: true
- name: Disable movim website
ansible.builtin.file:
path: "{{ nginx.paths.sites_enabled }}/{{ movim.domain }}"
@ -50,6 +32,17 @@
path: "{{ nginx.paths.sites_enabled }}/default"
state: absent
- name: Create auto redirect to TLS for movim
ansible.builtin.blockinfile:
path: "{{ nginx.paths.sites_available }}/redirect_to_https"
block: |
server {
listen 80 default_server;
server_name _;
return 301 https://$host$request_uri;
}
create: true
- name: Create movim website
ansible.builtin.template:
dest: "{{ nginx.paths.sites_available }}/{{ movim.domain }}"
@ -70,7 +63,14 @@
dest: "{{ nginx.paths.sites_enabled }}/redirect_to_https"
src: "{{ nginx.paths.sites_available }}/redirect_to_https"
- name: Set access logs to off
ansible.builtin.blockinfile:
path: "{{ nginx.paths.conf_d }}/10-access_log-disabled.conf"
block: |
access_log off;
create: true
- name: Reload nginx service
ansible.builtin.systemd_service:
name: nginx
state: reloaded
state: restarted