1
0
Fork 0
forked from infra/ansible

communishift: Print human readable list of projects once notification

emails sent

Signed-off-by: David Kirwan <davidkirwanirl@gmail.com>
This commit is contained in:
David Kirwan 2026-05-01 13:37:37 +01:00
commit 7522b50a64
Signed by untrusted user: dkirwan
GPG key ID: A5893AB6474AC37D

View file

@ -34,18 +34,7 @@
- name: Summary of Communishift projects notified # noqa: run-once[task]
ansible.builtin.debug:
msg: |
{% set ns = namespace(names=[]) %}
{% for item in communishift_projects | dict2items | sort(attribute='value.name') %}
{% if not (item.value.do_not_delete | default(false)) %}
{% set _ = ns.names.append(item.value.name) %}
{% endif %}
{% endfor %}
Communishift notification run complete. Emails were sent for {{ ns.names | length }} project(s):
{% for name in ns.names %}
- {{ name }}
{% endfor %}
msg: "{%- set ns = namespace(names=[]) %}{%- for item in communishift_projects | dict2items | sort(attribute='value.name') %}{%- if not (item.value.do_not_delete | default(false)) %}{%- set _ = ns.names.append(item.value.name) %}{%- endif %}{%- endfor %} Communishift notification run complete. Emails were sent for {{ ns.names | length }} project(s): {{ ns.names | join(' ') }}"
run_once: true
tags:
- communishift_send_notifications