From fa5736044801dca596f109e04b080c0b0403d74e Mon Sep 17 00:00:00 2001
From: Adar Nimrod <nimrod@shore.co.il>
Date: Fri, 29 Jan 2021 00:10:07 +0200
Subject: [PATCH] Tag the included tasks in the renew-certs playbook.

Otherwise nothing is done.
---
 renew-certs.yaml | 18 +++++++++++++++---
 1 file changed, 15 insertions(+), 3 deletions(-)

diff --git a/renew-certs.yaml b/renew-certs.yaml
index 397a5df..449561a 100644
--- a/renew-certs.yaml
+++ b/renew-certs.yaml
@@ -26,7 +26,11 @@
 
   tasks:
     - name: Issue certificate for ns4
-      include_tasks: '{{ playbook_dir }}/tasks/renew-cert.yaml'
+      include_tasks:
+        apply:
+          tags:
+            - ns4
+        file: '{{ playbook_dir }}/tasks/renew-cert.yaml'
       vars:
         handlers:
           - Restart Nginx on ns4
@@ -37,7 +41,11 @@
         - ns4
 
     - name: Issue certificate for host01
-      include_tasks: '{{ playbook_dir }}/tasks/renew-cert.yaml'
+      include_tasks:
+        apply:
+          tags:
+            - host01
+        file: '{{ playbook_dir }}/tasks/renew-cert.yaml'
       vars:
         handlers:
           - Restart Nginx on host01
@@ -48,7 +56,11 @@
         - host01
 
     - name: Issue certificate for smtp
-      include_tasks: '{{ playbook_dir }}/tasks/renew-cert.yaml'
+      include_tasks:
+        apply:
+          tags:
+            - smtp
+        file: '{{ playbook_dir }}/tasks/renew-cert.yaml'
       vars:
         delegate_host: host01
         filename: mail
-- 
GitLab