2020-05-06 11:11:30 +00:00
|
|
|
---
|
2020-08-17 10:56:15 +00:00
|
|
|
|
|
|
|
- block: # Used for tagging all tasks with "drupal"
|
|
|
|
|
|
|
|
- name: "Set site_data_path to {{ www_path }}/{{ site.slug }}"
|
|
|
|
set_fact: site_data_path="{{ www_path }}/{{ site.slug }}"
|
|
|
|
tags: always
|
|
|
|
|
|
|
|
|
|
|
|
####################
|
|
|
|
# Render templates #
|
|
|
|
####################
|
|
|
|
|
2020-10-18 17:27:13 +00:00
|
|
|
- name: "Render templates"
|
|
|
|
import_tasks: render.yml
|
|
|
|
tags: render
|
|
|
|
|
|
|
|
# - name: "Create folder {{ sites_path }}/{{ site.slug }}"
|
|
|
|
# file:
|
|
|
|
# path: "{{ sites_path }}/{{ site.slug }}"
|
|
|
|
# state: directory
|
|
|
|
# mode: '750'
|
|
|
|
# tags: [docker, nginx, mysql]
|
|
|
|
|
|
|
|
# - name: Render sexy Dockerfile
|
|
|
|
# template:
|
|
|
|
# src: drupal/Dockerfile.j2
|
|
|
|
# dest: "{{ sites_path }}/{{ site.slug }}/Dockerfile"
|
|
|
|
# tags: docker
|
|
|
|
|
|
|
|
# - name: Render marvelous docker-compose.yml
|
|
|
|
# template:
|
|
|
|
# src: drupal/docker-compose.yml.j2
|
|
|
|
# dest: "{{ sites_path }}/{{ site.slug }}/docker-compose.yml"
|
|
|
|
# tags: docker
|
|
|
|
|
|
|
|
# - name: Render swell nginx site config
|
|
|
|
# template:
|
|
|
|
# src: drupal/nginx.j2
|
|
|
|
# dest: "/etc/nginx/sites-available/{{ site.url }}"
|
|
|
|
# become: yes
|
|
|
|
# tags: nginx
|
2020-08-17 10:56:15 +00:00
|
|
|
|
|
|
|
|
|
|
|
#######################
|
|
|
|
# MySQL configuration #
|
|
|
|
#######################
|
|
|
|
|
|
|
|
- name: "Setup MySQL"
|
|
|
|
import_tasks: mysql.yml
|
|
|
|
tags: mysql
|
|
|
|
|
|
|
|
|
|
|
|
#################
|
|
|
|
# Setup backups #
|
|
|
|
#################
|
|
|
|
|
|
|
|
- name: "Setup backups"
|
|
|
|
import_tasks: backup.yml
|
|
|
|
tags: backup
|
|
|
|
|
|
|
|
|
|
|
|
###################
|
|
|
|
# SSL certificate #
|
|
|
|
###################
|
|
|
|
|
|
|
|
# - name: Create Let's Encrypt certificate
|
|
|
|
# This seems hard, see:
|
|
|
|
# https://docs.ansible.com/ansible/latest/modules/acme_certificate_module.html#acme-certificate-module
|
|
|
|
# https://www.digitalocean.com/community/tutorials/how-to-acquire-a-let-s-encrypt-certificate-using-ansible-on-ubuntu-18-04
|
|
|
|
# Maybe using shell directly? e.g.
|
|
|
|
# certbot certonly --webroot -w /var/www/letsencrypt -d <url>
|
|
|
|
|
|
|
|
tags: drupal # /block
|