From 99107cd83266a6b5c802bc0fc20600db9d2cafe6 Mon Sep 17 00:00:00 2001 From: Yohann D'ANELLO <ynerant@crans.org> Date: Tue, 8 Jun 2021 16:54:49 +0200 Subject: [PATCH] Update Ansible header since template_path changed its semantic Signed-off-by: Yohann D'ANELLO <ynerant@crans.org> --- group_vars/all/vars.yaml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/group_vars/all/vars.yaml b/group_vars/all/vars.yaml index ec368d89..1803dd01 100644 --- a/group_vars/all/vars.yaml +++ b/group_vars/all/vars.yaml @@ -1,15 +1,15 @@ --- # Custom header -dirty: "{% if template_path is defined %}{{ lookup('pipe', 'git diff --quiet -- ' + template_path | quote + ' || echo dirty') }}{% else %}{{ lookup('pipe', 'git diff --quiet || echo dirty') }}{% endif %}" +dirty: "{% if template_fullpath is defined %}{{ lookup('pipe', 'git diff --quiet -- ' + template_fullpath | quote + ' || echo dirty') }}{% else %}{{ lookup('pipe', 'git diff --quiet || echo dirty') }}{% endif %}" ansible_header: | +++++++++++++++++++++++++++++++++++++++++++++++++++ Ansible managed, don't modify the file locally. See https://gitlab.crans.org/nounous/ansible. - {% if template_path is defined %}{% set _, rpath = template_path.split('roles/', 1) %}Commit: {% if dirty %}({{dirty}}) {% endif %}{{ lookup('pipe', 'git log -n 1 --pretty=format:%H -- ' + template_path | quote) }} + {% if template_fullpath is defined %}{% set _, rpath = template_fullpath.split('roles/', 1) %}Commit: {% if dirty %}({{dirty}}) {% endif %}{{ lookup('pipe', 'git log -n 1 --pretty=format:%H -- ' + template_fullpath | quote) }} {% if dirty %}Run by: {{ ansible_env.SUDO_USER }} - {% else %}Author: {{ lookup('pipe', 'git log -n 1 --pretty=format:%an -- ' + template_path | quote) }} + {% else %}Author: {{ lookup('pipe', 'git log -n 1 --pretty=format:%an -- ' + template_fullpath | quote) }} {% endif %}Template: roles/{{ rpath }} {% else %} Run by: {{ ansible_env.SUDO_USER }} -- GitLab