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:
parent
b1fca1e089
commit
7522b50a64
1 changed files with 1 additions and 12 deletions
|
|
@ -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
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue