phase in role elementweb

This commit is contained in:
Nico Schottelius 2023-12-04 08:57:12 +01:00
parent c1ddbfb71c
commit 91421c02e5
4 changed files with 32 additions and 0 deletions

View file

@ -0,0 +1,27 @@
- name: Copy docker-compose contents
ansible.builtin.copy:
src: files/basedir/{{ item }}/
dest: /home/{{ ansible_user }}/docker_compose/{{ docker_compose }}
owner: "{{ ansible_user }}"
mode: '0644'
tags:
- files
- test
- name: Create nginx dir
ansible.builtin.file:
path: /home/{{ ansible_user }}/docker_compose/nginx
state: directory
owner: "{{ ansible_user }}"
mode: '0755'
tags:
- dir
- name: Create nginx config
ansible.builtin.template:
src: "nginx/elementweb.conf"
dest: /home/{{ ansible_user }}/docker_compose/nginx/elementweb.conf
owner: "{{ ansible_user }}"
mode: '0644'
tags:
- test

View file

@ -6,6 +6,11 @@ server {
ssl_certificate /ssl/chain.crt;
ssl_certificate_key /ssl/certificate.keyplain;
access_log /var/log/nginx/element/access-{{ inventory_hostname }}.log main;
access_log /var/log/nginx/access-{{ inventory_hostname }}.log main;
error_log /var/log/nginx/element/error-{{ inventory_hostname }}.log notice;
error_log /var/log/nginx/error-{{ inventory_hostname }}.log notice;
error_page 403 404 /403_404.html;
location = /403_404.html {
default_type application/json;