added tags

This commit is contained in:
Adrien Luxey 2020-04-29 17:15:49 +02:00
parent 260a8e6603
commit 78efb7b7e2
5 changed files with 21 additions and 3 deletions

View file

@ -3,22 +3,26 @@
path: "{{ sites_path }}/{{ item.slug }}" path: "{{ sites_path }}/{{ item.slug }}"
state: directory state: directory
mode: '750' mode: '750'
tags: [docker, nginx]
- name: Render sexy Dockerfile - name: Render sexy Dockerfile
template: template:
src: drupal/Dockerfile.j2 src: drupal/Dockerfile.j2
dest: "{{ sites_path }}/{{ item.slug }}/Dockerfile" dest: "{{ sites_path }}/{{ item.slug }}/Dockerfile"
tags: docker
- name: Render marvelous docker-compose.yml - name: Render marvelous docker-compose.yml
template: template:
src: drupal/docker-compose.yml.j2 src: drupal/docker-compose.yml.j2
dest: "{{ sites_path }}/{{ item.slug }}/docker-compose.yml" dest: "{{ sites_path }}/{{ item.slug }}/docker-compose.yml"
tags: docker
- name: Render swell nginx site config - name: Render swell nginx site config
template: template:
src: drupal/nginx.j2 src: drupal/nginx.j2
dest: "/etc/nginx/sites-available/{{ item.url }}" dest: "/etc/nginx/sites-available/{{ item.url }}"
become: yes become: yes
tags: nginx
# - name: Create Let's Encrypt certificate # - name: Create Let's Encrypt certificate
# This seems hard, see: # This seems hard, see:
@ -43,3 +47,4 @@
# Grants # Grants
priv: "{{ item.mysql_database }}.*:all" priv: "{{ item.mysql_database }}.*:all"
state: present state: present
tags: mysql

View file

@ -3,22 +3,26 @@
path: "{{ sites_path }}/{{ item.slug }}" path: "{{ sites_path }}/{{ item.slug }}"
state: directory state: directory
mode: '750' mode: '750'
tags: [docker, nginx]
- name: Render sexy Dockerfile - name: Render sexy Dockerfile
template: template:
src: wordpress/Dockerfile.j2 src: wordpress/Dockerfile.j2
dest: "{{ sites_path }}/{{ item.slug }}/Dockerfile" dest: "{{ sites_path }}/{{ item.slug }}/Dockerfile"
tags: docker
- name: Render marvelous docker-compose.yml - name: Render marvelous docker-compose.yml
template: template:
src: wordpress/docker-compose.yml.j2 src: wordpress/docker-compose.yml.j2
dest: "{{ sites_path }}/{{ item.slug }}/docker-compose.yml" dest: "{{ sites_path }}/{{ item.slug }}/docker-compose.yml"
tags: docker
- name: Render swell nginx site config - name: Render swell nginx site config
template: template:
src: wordpress/nginx.j2 src: wordpress/nginx.j2
dest: "/etc/nginx/sites-available/{{ item.url }}" dest: "/etc/nginx/sites-available/{{ item.url }}"
become: yes become: yes
tags: nginx
# - name: Create Let's Encrypt certificate # - name: Create Let's Encrypt certificate
# This seems hard, see: # This seems hard, see:
@ -43,3 +47,4 @@
# Grants # Grants
priv: "{{ item.mysql_database }}.*:all" priv: "{{ item.mysql_database }}.*:all"
state: present state: present
tags: mysql

View file

@ -1,4 +1,4 @@
FROM drupal:8-apache FROM drupal:8.8.5-apache
RUN apt-get update; \ RUN apt-get update; \
apt-get install -y --no-install-recommends msmtp; \ apt-get install -y --no-install-recommends msmtp; \

View file

@ -4,6 +4,7 @@
state: present state: present
build: yes build: yes
restarted: yes restarted: yes
tags: docker
- name: "Symlink nginx configuration to sites-enabled" - name: "Symlink nginx configuration to sites-enabled"
file: file:
@ -11,13 +12,16 @@
dest: "/etc/nginx/sites-enabled/{{ item.url }}" dest: "/etc/nginx/sites-enabled/{{ item.url }}"
state: link state: link
become: yes become: yes
tags: nginx
- name: Verify nginx configuration - name: Verify nginx configuration
command: "nginx -t" command: "nginx -t"
become: yes become: yes
tags: nginx
- name: Restart nginx service - name: Restart nginx service
service: service:
name: nginx name: nginx
state: restarted state: restarted
become: yes become: yes
tags: nginx

View file

@ -4,6 +4,7 @@
state: present state: present
build: yes build: yes
restarted: yes restarted: yes
tags: docker
- name: "Symlink nginx configuration to sites-enabled" - name: "Symlink nginx configuration to sites-enabled"
file: file:
@ -11,13 +12,16 @@
dest: "/etc/nginx/sites-enabled/{{ item.url }}" dest: "/etc/nginx/sites-enabled/{{ item.url }}"
state: link state: link
become: yes become: yes
tags: nginx
- name: Verify nginx configuration - name: Verify nginx configuration
command: "nginx -t" command: "nginx -t"
become: yes become: yes
tags: nginx
- name: Restart nginx service - name: Restart nginx service
service: service:
name: nginx name: nginx
state: restarted state: restarted
become: yes become: yes
tags: nginx