An open API service indexing awesome lists of open source software.

https://github.com/devture/com.devture.ansible.role.playbook_runtime_messages

An Ansible role which lets other roles inject messages into a variable and outputs those messages at the end of playbook execution
https://github.com/devture/com.devture.ansible.role.playbook_runtime_messages

Last synced: 2 months ago
JSON representation

An Ansible role which lets other roles inject messages into a variable and outputs those messages at the end of playbook execution

Awesome Lists containing this project

README

        

# Ansible playbook runtime messages role

This is an Ansible role which lets other roles inject messages into `devture_playbook_runtime_messages_list` and outputs those messages at the end of playbook execution.

## Usage

Example playbook:

```yaml
- hosts: servers
roles:
- role: some_role
- role: another_role

- role: galaxy/com.devture.ansible.role.playbook_runtime_messages
```

Example tasks in `some_role` or `another_role`:

```yaml
- name: Inject warning message
ansible.builtin.set_fact:
devture_playbook_runtime_messages_list: |
{{
devture_playbook_runtime_messages_list | default([])
+
[
"NOTE: This is a warning message to be printed at the end of playbook execution"
]
}}
```