From 2a0506bbcc97ef2e44070e458fb8aa6113b57347 Mon Sep 17 00:00:00 2001 From: newtonne Date: Mon, 10 Sep 2018 20:59:29 +0100 Subject: [PATCH] Use absolute rather than relative path for config.yml The relative path is relative to the files/ directory and so the include breaks if that directory is deleted. https://groups.google.com/forum/#!topic/ansible-project/MzSZLYhx5AY Therefore seems more robust to switch to an absolute path making use of `playbook_dir`. --- main.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/main.yml b/main.yml index 46d0e21..12ef55e 100644 --- a/main.yml +++ b/main.yml @@ -8,7 +8,7 @@ pre_tasks: - include_vars: "{{ item }}" with_fileglob: - - ../config.yml + - "{{ playbook_dir }}/config.yml" tags: ['always'] roles: