From 2017b2e7eb256d81ff420cb1749cb507890acc4c Mon Sep 17 00:00:00 2001
From: jurgenhaas <juergen@paragon-es.de>
Date: Tue, 17 May 2016 09:47:13 +0200
Subject: [PATCH] Start adding tags to be able to deploy Drupal updates

---
 tasks/install.d8.yml        | 2 +-
 tasks/install.gitscript.yml | 4 ++++
 tasks/install.yml           | 7 +++++++
 3 files changed, 12 insertions(+), 1 deletion(-)

diff --git a/tasks/install.d8.yml b/tasks/install.d8.yml
index 8bfc643..4349098 100644
--- a/tasks/install.d8.yml
+++ b/tasks/install.d8.yml
@@ -26,4 +26,4 @@
     - '/modules/contrib'
     - '/themes/custom'
     - '/themes/contrib'
-  when: drupal.version|default('d7') == 'd8'
+  tags: 'deploy'
diff --git a/tasks/install.gitscript.yml b/tasks/install.gitscript.yml
index a008ca3..596bbe8 100644
--- a/tasks/install.gitscript.yml
+++ b/tasks/install.gitscript.yml
@@ -8,6 +8,7 @@
     owner: 'root'
     group: 'root'
     mode: '775'
+  tags: 'deploy'
 
 - name: "Clone Git Repository"
   git:
@@ -18,6 +19,7 @@
     force: yes
     version: '{{ drupal.src.git.branch|default(omit) }}'
   become: false
+  tags: 'deploy'
 
 - name: "Second Clone Git Repository"
   git:
@@ -26,7 +28,9 @@
     force: yes
     version: '{{ drupal.src.git.branch|default(omit) }}'
   when: drupal.src.git.target2 is defined
+  tags: 'deploy'
 
 - name: "Run Script"
   shell: '{{ webRoot }}{{ drupal.src.git.target }}{{ drupal.src.script }}'
   when: drupal.src.script is defined and drupal.src.script
+  tags: 'deploy'
diff --git a/tasks/install.yml b/tasks/install.yml
index 35bc685..0857f79 100644
--- a/tasks/install.yml
+++ b/tasks/install.yml
@@ -38,12 +38,18 @@
     group='{{ apacheUser }}'
     mode='g+w'
     recurse=yes
+  tags: 'deploy'
 
 - name: "Check Installation Requirement"
   shell: ls {{ drupalRoot }}/index.php
   register: drupal_available
   failed_when: false
 
+- set_fact:
+    drupal_available:
+      stdout: ''
+  tags: 'deploy'
+
 - include: install.{{ installSource.mode|default("none") }}.yml
   when: drupal_install_drupal and drupal_available is defined and drupal_available.stdout != '{{ drupalRoot }}/index.php'
 
@@ -56,6 +62,7 @@
     dest: '{{ drupalRoot }}{{ item.dest }}'
     state: 'link'
   with_items: '{{ drupal.links|default([]) }}'
+  tags: 'deploy'
 
 - include: users.{{ installSource.mode|default("none") }}.yml
   when: drupal_install_drupal and drupal.src.name is defined
-- 
GitLab