From 398be78bdb9d2dead62a3c61e5bad248dccd851a Mon Sep 17 00:00:00 2001 From: Bombar Maxime Date: Thu, 16 Apr 2020 18:05:39 +0200 Subject: [PATCH] Don't fail when template_path is not defined --- group_vars/all/vars.yaml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/group_vars/all/vars.yaml b/group_vars/all/vars.yaml index 8a6a9810..b5b87e94 100644 --- a/group_vars/all/vars.yaml +++ b/group_vars/all/vars.yaml @@ -5,5 +5,6 @@ ansible_header: | See https://gitlab.crans.org/nounous/ansible. Run by: {{ ansible_env.SUDO_USER }} Latest commit: {% if dirty %}({{dirty}}) {% endif %}{{ lookup('pipe', 'git rev-parse HEAD') }} - {% set _, rpath = template_path.split('roles/') %}Template: roles/{{ rpath }} + {% if template_path is defined %}{% set _, rpath = template_path.split('roles/') %}Template: roles/{{ rpath }} + {% endif %} +++++++++++++++++++++++++++++++++++++++++++++++++++