From d45da7497f4d0986ead14bc57dfad41447bdf045 Mon Sep 17 00:00:00 2001 From: "Kevin Veen-Birkenbach [aka. Frantz]" Date: Mon, 18 Oct 2021 20:24:52 +0200 Subject: [PATCH] Implemented the possibility for multisite wordpress --- roles/docker-wordpress/tasks/main.yml | 11 +++++++---- site.yml | 2 +- 2 files changed, 8 insertions(+), 5 deletions(-) diff --git a/roles/docker-wordpress/tasks/main.yml b/roles/docker-wordpress/tasks/main.yml index d9161b11..11043409 100644 --- a/roles/docker-wordpress/tasks/main.yml +++ b/roles/docker-wordpress/tasks/main.yml @@ -1,11 +1,14 @@ --- -- name: recieve {{domain}} certificate - command: certbot certonly --agree-tos --email {{administrator_email}} --non-interactive --webroot -w /var/lib/letsencrypt/ -d {{domain}} +- name: recieve wordpress certificates + command: certbot certonly --agree-tos --email {{administrator_email}} --non-interactive --webroot -w /var/lib/letsencrypt/ -d {{item}} + loop: "{{domains}}" -- name: configure {{domain}}.conf +- name: configure wordpress nginx configurations vars: client_max_body_size: "2M" - template: src=roles/native-docker-reverse-proxy/templates/domain.conf.j2 dest=/etc/nginx/conf.d/{{domain}}.conf + domain: "{{item}}" + template: src=roles/native-docker-reverse-proxy/templates/domain.conf.j2 dest=/etc/nginx/conf.d/{{ item }}.conf + loop: "{{domains}}" notify: restart nginx - name: "setup wordpress" diff --git a/site.yml b/site.yml index 8f1fc233..f3967da8 100644 --- a/site.yml +++ b/site.yml @@ -58,7 +58,7 @@ roles: - role: docker-wordpress vars: - domain: www.{{top_domain}} + domains: "{{wordpress_domains}}" http_port: 8003 - name: setup mediawiki hosts hosts: mediawiki_hosts