From 78efb7b7e2a90ec7e08e14db1bf393d5569d9612 Mon Sep 17 00:00:00 2001 From: Adrien Luxey Date: Wed, 29 Apr 2020 17:15:49 +0200 Subject: [PATCH] added tags --- ansible/roles/build/tasks/drupal.yml | 5 +++++ ansible/roles/build/tasks/wordpress.yml | 5 +++++ ansible/roles/build/templates/drupal/Dockerfile.j2 | 2 +- ansible/roles/deploy/tasks/drupal.yml | 6 +++++- ansible/roles/deploy/tasks/wordpress.yml | 6 +++++- 5 files changed, 21 insertions(+), 3 deletions(-) diff --git a/ansible/roles/build/tasks/drupal.yml b/ansible/roles/build/tasks/drupal.yml index 2688444..e39739b 100644 --- a/ansible/roles/build/tasks/drupal.yml +++ b/ansible/roles/build/tasks/drupal.yml @@ -3,22 +3,26 @@ path: "{{ sites_path }}/{{ item.slug }}" state: directory mode: '750' + tags: [docker, nginx] - name: Render sexy Dockerfile template: src: drupal/Dockerfile.j2 dest: "{{ sites_path }}/{{ item.slug }}/Dockerfile" + tags: docker - name: Render marvelous docker-compose.yml template: src: drupal/docker-compose.yml.j2 dest: "{{ sites_path }}/{{ item.slug }}/docker-compose.yml" + tags: docker - name: Render swell nginx site config template: src: drupal/nginx.j2 dest: "/etc/nginx/sites-available/{{ item.url }}" become: yes + tags: nginx # - name: Create Let's Encrypt certificate # This seems hard, see: @@ -43,3 +47,4 @@ # Grants priv: "{{ item.mysql_database }}.*:all" state: present + tags: mysql diff --git a/ansible/roles/build/tasks/wordpress.yml b/ansible/roles/build/tasks/wordpress.yml index be9fafa..1226513 100644 --- a/ansible/roles/build/tasks/wordpress.yml +++ b/ansible/roles/build/tasks/wordpress.yml @@ -3,22 +3,26 @@ path: "{{ sites_path }}/{{ item.slug }}" state: directory mode: '750' + tags: [docker, nginx] - name: Render sexy Dockerfile template: src: wordpress/Dockerfile.j2 dest: "{{ sites_path }}/{{ item.slug }}/Dockerfile" + tags: docker - name: Render marvelous docker-compose.yml template: src: wordpress/docker-compose.yml.j2 dest: "{{ sites_path }}/{{ item.slug }}/docker-compose.yml" + tags: docker - name: Render swell nginx site config template: src: wordpress/nginx.j2 dest: "/etc/nginx/sites-available/{{ item.url }}" become: yes + tags: nginx # - name: Create Let's Encrypt certificate # This seems hard, see: @@ -43,3 +47,4 @@ # Grants priv: "{{ item.mysql_database }}.*:all" state: present + tags: mysql diff --git a/ansible/roles/build/templates/drupal/Dockerfile.j2 b/ansible/roles/build/templates/drupal/Dockerfile.j2 index 680a27c..122facd 100644 --- a/ansible/roles/build/templates/drupal/Dockerfile.j2 +++ b/ansible/roles/build/templates/drupal/Dockerfile.j2 @@ -1,4 +1,4 @@ -FROM drupal:8-apache +FROM drupal:8.8.5-apache RUN apt-get update; \ apt-get install -y --no-install-recommends msmtp; \ diff --git a/ansible/roles/deploy/tasks/drupal.yml b/ansible/roles/deploy/tasks/drupal.yml index 88e93f6..0f6f825 100644 --- a/ansible/roles/deploy/tasks/drupal.yml +++ b/ansible/roles/deploy/tasks/drupal.yml @@ -4,6 +4,7 @@ state: present build: yes restarted: yes + tags: docker - name: "Symlink nginx configuration to sites-enabled" file: @@ -11,13 +12,16 @@ dest: "/etc/nginx/sites-enabled/{{ item.url }}" state: link become: yes + tags: nginx - name: Verify nginx configuration command: "nginx -t" become: yes + tags: nginx - name: Restart nginx service service: name: nginx state: restarted - become: yes \ No newline at end of file + become: yes + tags: nginx \ No newline at end of file diff --git a/ansible/roles/deploy/tasks/wordpress.yml b/ansible/roles/deploy/tasks/wordpress.yml index 88e93f6..0f6f825 100644 --- a/ansible/roles/deploy/tasks/wordpress.yml +++ b/ansible/roles/deploy/tasks/wordpress.yml @@ -4,6 +4,7 @@ state: present build: yes restarted: yes + tags: docker - name: "Symlink nginx configuration to sites-enabled" file: @@ -11,13 +12,16 @@ dest: "/etc/nginx/sites-enabled/{{ item.url }}" state: link become: yes + tags: nginx - name: Verify nginx configuration command: "nginx -t" become: yes + tags: nginx - name: Restart nginx service service: name: nginx state: restarted - become: yes \ No newline at end of file + become: yes + tags: nginx \ No newline at end of file