From 8c418e63dc5e826b34f1f5128593266d1cbec5c5 Mon Sep 17 00:00:00 2001
From: jurgenhaas <juergen@paragon-es.de>
Date: Tue, 11 Jun 2019 19:33:37 +0200
Subject: [PATCH] ansible-playbooks/general#85 Name import and include tasks

---
 tasks/main.yml | 30 ++++++++++++++++++++----------
 1 file changed, 20 insertions(+), 10 deletions(-)

diff --git a/tasks/main.yml b/tasks/main.yml
index 157cb51..9715a7c 100644
--- a/tasks/main.yml
+++ b/tasks/main.yml
@@ -9,30 +9,40 @@
 
 - block:
 
-    - import_tasks: prepare.yml
+    - name: Import prepare
+      import_tasks: prepare.yml
 
-    - import_tasks: install.yml
+    - name: Import install
+      import_tasks: install.yml
 
-    - import_tasks: configure.yml
+    - name: Import configure
+      import_tasks: configure.yml
 
-    - import_tasks: apache.yml
+    - name: Import apache
+      import_tasks: apache.yml
       when: groups['webserver'] is defined and inventory_hostname in groups['webserver']
 
-    - import_tasks: elasticsearch.yml
+    - name: Import elasticsearch
+      import_tasks: elasticsearch.yml
       when: groups['logserver'] is defined and inventory_hostname in groups['logserver']
 
-    - import_tasks: haproxy.yml
+    - name: Import haproxy
+      import_tasks: haproxy.yml
       when: groups['proxyserver'] is defined and inventory_hostname in groups['proxyserver']
 
-    - import_tasks: mysql.yml
+    - name: Import mysql
+      import_tasks: mysql.yml
       when: groups['dbserver_mysql'] is defined and inventory_hostname in groups['dbserver_mysql']
 
-    - import_tasks: silent.yml
+    - name: Import silent
+      import_tasks: silent.yml
 
-    - import_tasks: varnish.yml
+    - name: Import varnish
+      import_tasks: varnish.yml
       when: groups['varnishserver'] is defined and inventory_hostname in groups['varnishserver']
 
-    - import_tasks: heartbeat.yml
+    - name: Import heartbeat
+      import_tasks: heartbeat.yml
       when: netdata_heartbeat|default(true)
 
   when: not excluded_roles or "netdata" not in excluded_roles
-- 
GitLab