Better looking ansible_header

certbot_on_virtu
_pollion 2020-04-18 16:16:40 +02:00
parent 90dc7c1c59
commit d1a9cd4f6a
1 changed files with 2 additions and 0 deletions

View File

@ -1,10 +1,12 @@
dirty: "{{lookup('pipe', 'git diff --quiet || echo dirty')}}"
ansible_header: |
+++++++++++++++++++++++++++++++++++++++++++++++++++
Ansible managed, don't modify the file locally.
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') }}
{% if template_path is defined %}{% set _, rpath = template_path.split('roles/') %}Template: roles/{{ rpath }}
{% endif %}
+++++++++++++++++++++++++++++++++++++++++++++++++++