change order so it is possible to reach nginx

This commit is contained in:
Torma Kristóf 2023-03-05 18:53:55 +01:00
parent 9b50274e36
commit d83c801db1
3 changed files with 10 additions and 11 deletions

View File

@ -97,7 +97,7 @@
name: name:
- prometheus-nginx-exporter - prometheus-nginx-exporter
- name: Copy default nginx config - name: Copy nginx exporter config
ansible.builtin.copy: ansible.builtin.copy:
src: prometheus-nginx-exporter src: prometheus-nginx-exporter
dest: /etc/default/prometheus-nginx-exporter dest: /etc/default/prometheus-nginx-exporter

View File

@ -1,4 +1,10 @@
--- ---
- name: Allow https port via ufw
community.general.ufw:
rule: allow
port: https
src: 192.168.69.0/24
- name: "Install Nginx via apt" - name: "Install Nginx via apt"
apt: apt:
update_cache: yes update_cache: yes
@ -62,7 +68,7 @@
proto: tcp proto: tcp
src: 192.168.69.0/24 src: 192.168.69.0/24
- name: Copy default nginx config - name: Copy nginx exporter config
ansible.builtin.copy: ansible.builtin.copy:
src: prometheus-nginx-exporter src: prometheus-nginx-exporter
dest: /etc/default/prometheus-nginx-exporter dest: /etc/default/prometheus-nginx-exporter
@ -75,10 +81,4 @@
name: prometheus-nginx-exporter name: prometheus-nginx-exporter
state: restarted state: restarted
enabled: yes enabled: yes
- name: Allow https port via ufw
community.general.ufw:
rule: allow
port: https
src: 192.168.69.0/24
... ...

View File

@ -66,9 +66,8 @@ http {
server { server {
listen 443 ssl http2; listen 443 ssl http2;
listen [::]:443 ssl http2; listen [::]:443 ssl http2;
server_name {{ server.domain }}; ssl_certificate /etc/letsencrypt/live/{{ server.domain }}/fullchain.pem;
ssl_certificate /etc/ssl/certs/ssl-cert-snakeoil.pem; ssl_certificate_key /etc/letsencrypt/live/{{ server.domain }}/privkey.pem;
ssl_certificate_key /etc/ssl/private/ssl-cert-snakeoil.key;
{% if server.bigrequests -%} {% if server.bigrequests -%}
client_max_body_size 8G; client_max_body_size 8G;
{% endif -%} {% endif -%}