From a4e4fde883110e79aa704a69d0ec3c5f07f78d08 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Marek=20Jaro=C5=A1?= <jaros@ics.muni.cz>
Date: Fri, 10 Dec 2021 14:32:35 +0100
Subject: [PATCH] Avoid playbook_dir variable and use relative paths. (Closes
 #1)

---
 icinga/icinga-deps.yml          | 2 +-
 icinga/icinga-groups.yml        | 6 +++---
 icinga/icinga-hosts.yml         | 2 +-
 icinga/icinga-notifications.yml | 2 +-
 icinga/icinga-services.yml      | 2 +-
 icinga/icinga-users.yml         | 2 +-
 6 files changed, 8 insertions(+), 8 deletions(-)

diff --git a/icinga/icinga-deps.yml b/icinga/icinga-deps.yml
index 0ea1c5c..355f35c 100644
--- a/icinga/icinga-deps.yml
+++ b/icinga/icinga-deps.yml
@@ -41,7 +41,7 @@
                           !{{ item.attrs.parent_service_name }}{% endif %}' }"
       loop: "{{ icinga_deps }}"
 
-    - include_tasks: "{{ playbook_dir }}/icinga/icinga-base.yml"
+    - include_tasks: "icinga-base.yml"
 
   when:
     - icinga_deps is defined
diff --git a/icinga/icinga-groups.yml b/icinga/icinga-groups.yml
index 8d88b89..5e6f530 100644
--- a/icinga/icinga-groups.yml
+++ b/icinga/icinga-groups.yml
@@ -19,7 +19,7 @@
       set_fact:
         icinga_base_items: "{{ icinga_usergroups }}"
 
-    - include_tasks: "{{ playbook_dir }}/icinga/icinga-base.yml"
+    - include_tasks: "icinga-base.yml"
 
   when:
     - icinga_usergroups is defined
@@ -55,7 +55,7 @@
           cascade: "?cascade={{ item.cascade |default(0) }}"
       loop: "{{ icinga_hostgroups }}"
 
-    - include_tasks: "{{ playbook_dir }}/icinga/icinga-base.yml"
+    - include_tasks: "icinga-base.yml"
 
   when:
     - icinga_hostgroups is defined
@@ -96,7 +96,7 @@
       set_fact:
         icinga_base_items: "{{ icinga_servicegroups }}"
 
-    - include_tasks: "{{ playbook_dir }}/icinga/icinga-base.yml"
+    - include_tasks: "icinga-base.yml"
 
   when:
     - icinga_servicegroups is defined
diff --git a/icinga/icinga-hosts.yml b/icinga/icinga-hosts.yml
index cca790d..e0c38ea 100644
--- a/icinga/icinga-hosts.yml
+++ b/icinga/icinga-hosts.yml
@@ -31,7 +31,7 @@
           cascade: "?cascade={{ item.cascade |default(0) }}"
       loop: "{{ icinga_hosts }}"
 
-    - include_tasks: "{{ playbook_dir }}/icinga/icinga-base.yml"
+    - include_tasks: "icinga-base.yml"
   when:
     - icinga_hosts is defined
 
diff --git a/icinga/icinga-notifications.yml b/icinga/icinga-notifications.yml
index 2093717..feac47a 100644
--- a/icinga/icinga-notifications.yml
+++ b/icinga/icinga-notifications.yml
@@ -121,7 +121,7 @@
       when:
         - icinga_notify_items | length > 0
 
-    - include_tasks: "{{ playbook_dir }}/icinga/icinga-base.yml"
+    - include_tasks: "icinga-base.yml"
       when:
         - icinga_notify_items | length > 0
 
diff --git a/icinga/icinga-services.yml b/icinga/icinga-services.yml
index b115e23..3647114 100644
--- a/icinga/icinga-services.yml
+++ b/icinga/icinga-services.yml
@@ -64,7 +64,7 @@
       when:
         - icinga_service_items | length > 0
 
-    - include_tasks: "{{ playbook_dir }}/icinga/icinga-base.yml"
+    - include_tasks: "icinga-base.yml"
       when:
         - icinga_service_items | length > 0
 
diff --git a/icinga/icinga-users.yml b/icinga/icinga-users.yml
index d53b0e4..6207d13 100644
--- a/icinga/icinga-users.yml
+++ b/icinga/icinga-users.yml
@@ -19,7 +19,7 @@
       set_fact:
         icinga_base_items: "{{ icinga_users }}"
 
-    - include_tasks: "{{ playbook_dir }}/icinga/icinga-base.yml"
+    - include_tasks: "icinga-base.yml"
 
   when:
     - icinga_users is defined
-- 
GitLab