Compare commits

...

2 Commits

4 changed files with 19 additions and 11 deletions

View File

@ -74,11 +74,16 @@
- name: setup wordpress hosts - name: setup wordpress hosts
hosts: wordpress hosts: wordpress
become: true become: true
roles: tasks:
- role: docker-wordpress - name: Include docker-wordpress role for each domain
include_role:
name: docker-wordpress
vars: vars:
domains: "{{wordpress_domains}}" domain: "{{ item }}"
http_port: 8003 http_port: 8003
loop: "{{ wordpress_domains }}"
loop_control:
loop_var: item
- name: setup mediawiki hosts - name: setup mediawiki hosts
hosts: mediawiki hosts: mediawiki
become: true become: true

View File

@ -1,14 +1,16 @@
--- ---
- name: recieve wordpress certificates - name: recieve wordpress certificates for {{domain}}
command: certbot certonly --agree-tos --email {{administrator_email}} --non-interactive --webroot -w /var/lib/letsencrypt/ -d {{item}} command: certbot certonly --agree-tos --email {{administrator_email}} --non-interactive --webroot -w /var/lib/letsencrypt/ -d {{domain}}
loop: "{{domains}}"
- name: Activate NGINX matomo tracking for {{domain}}
include_role:
name: nginx-matomo-tracking
when: nginx_matomo_tracking_active
- name: configure wordpress nginx configurations - name: configure wordpress nginx configurations
vars: vars:
client_max_body_size: "{{wordpress_max_upload_size}}" client_max_body_size: "{{wordpress_max_upload_size}}"
domain: "{{item}}" template: src=roles/nginx-docker-reverse-proxy/templates/domain.conf.j2 dest=/etc/nginx/conf.d/{{ domain }}.conf
template: src=roles/nginx-docker-reverse-proxy/templates/domain.conf.j2 dest=/etc/nginx/conf.d/{{ item }}.conf
loop: "{{domains}}"
notify: restart nginx notify: restart nginx
- name: "create {{docker_compose_wordpress_path}}" - name: "create {{docker_compose_wordpress_path}}"

View File

@ -7,6 +7,7 @@ location /
proxy_set_header X-Real-IP $remote_addr; proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-Proto https; proxy_set_header X-Forwarded-Proto https;
proxy_set_header X-Forwarded-Port 443; proxy_set_header X-Forwarded-Port 443;
proxy_set_header Accept-Encoding "";
# WebSocket specific header # WebSocket specific header
proxy_http_version 1.1; proxy_http_version 1.1;

View File

@ -13,8 +13,8 @@ This Ansible role automates the integration of Matomo tracking code into Nginx-s
## Role Variables ## Role Variables
- `matomo_domain`: The domain of your Matomo installation. - `matomo_domain`: The domain of your Matomo installation.
- `base_domain`: The base domain of the website you wish to track. - `domain`: The domain of the website you wish to track.
- `matomo_site_id`: The site ID configured in your Matomo dashboard. - `matomo_auth_token`: Matomo auth token
## Dependencies ## Dependencies
- None. This role is designed to be included in Nginx server block configurations. - None. This role is designed to be included in Nginx server block configurations.