mirror of
https://github.com/kevinveenbirkenbach/computer-playbook.git
synced 2024-11-22 04:31:13 +01:00
refactored wordpress role
This commit is contained in:
parent
b53ff57f8a
commit
4a540e21b3
16
playbook.yml
16
playbook.yml
@ -74,16 +74,12 @@
|
|||||||
- name: setup wordpress hosts
|
- name: setup wordpress hosts
|
||||||
hosts: wordpress
|
hosts: wordpress
|
||||||
become: true
|
become: true
|
||||||
tasks:
|
roles:
|
||||||
- name: Include docker-wordpress role for each domain
|
- role: docker-wordpress
|
||||||
include_role:
|
vars:
|
||||||
name: docker-wordpress
|
domain: "{{ item }}"
|
||||||
vars:
|
http_port: 8003
|
||||||
domain: "{{ item }}"
|
|
||||||
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
|
||||||
|
10
roles/docker-wordpress/tasks/create-wordpress-nginx.yml
Normal file
10
roles/docker-wordpress/tasks/create-wordpress-nginx.yml
Normal file
@ -0,0 +1,10 @@
|
|||||||
|
- name: Activate NGINX matomo tracking for {{domain}}
|
||||||
|
include_role:
|
||||||
|
name: nginx-matomo-tracking
|
||||||
|
when: nginx_matomo_tracking_active
|
||||||
|
|
||||||
|
- name: configure wordpress nginx configurations
|
||||||
|
vars:
|
||||||
|
client_max_body_size: "{{wordpress_max_upload_size}}"
|
||||||
|
template: src=roles/nginx-docker-reverse-proxy/templates/domain.conf.j2 dest=/etc/nginx/conf.d/{{ domain }}.conf
|
||||||
|
notify: restart nginx
|
@ -1,17 +1,19 @@
|
|||||||
---
|
---
|
||||||
- name: recieve wordpress certificates for {{domain}}
|
- name: "include task receive certbot certificate"
|
||||||
command: certbot certonly --agree-tos --email {{administrator_email}} --non-interactive --webroot -w /var/lib/letsencrypt/ -d {{domain}}
|
include_tasks: recieve-certbot-certificate.yml
|
||||||
|
|
||||||
- name: Activate NGINX matomo tracking for {{domain}}
|
|
||||||
include_role:
|
|
||||||
name: nginx-matomo-tracking
|
|
||||||
when: nginx_matomo_tracking_active
|
|
||||||
|
|
||||||
- name: configure wordpress nginx configurations
|
|
||||||
vars:
|
vars:
|
||||||
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
|
loop: "{{ wordpress_domains }}"
|
||||||
notify: restart nginx
|
loop_control:
|
||||||
|
loop_var: item
|
||||||
|
|
||||||
|
- name: "include task create wordpress nginx"
|
||||||
|
include_tasks: create-wordpress-nginx.yml
|
||||||
|
vars:
|
||||||
|
domain: "{{ item }}"
|
||||||
|
loop: "{{ wordpress_domains }}"
|
||||||
|
loop_control:
|
||||||
|
loop_var: item
|
||||||
|
|
||||||
- name: "create {{docker_compose_instance_directory}}"
|
- name: "create {{docker_compose_instance_directory}}"
|
||||||
file:
|
file:
|
||||||
|
2
tasks/recieve-certbot-certificate.yml
Normal file
2
tasks/recieve-certbot-certificate.yml
Normal file
@ -0,0 +1,2 @@
|
|||||||
|
- name: recieve certbot certificate for {{domain}}
|
||||||
|
command: certbot certonly --agree-tos --email {{administrator_email}} --non-interactive --webroot -w /var/lib/letsencrypt/ -d {{domain}}
|
Loading…
Reference in New Issue
Block a user