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
- Host: GitHub
- URL: https://github.com/devture/com.devture.ansible.role.playbook_runtime_messages
- Owner: devture
- Created: 2022-10-21T03:35:37.000Z (over 2 years ago)
- Default Branch: main
- Last Pushed: 2022-11-24T09:26:19.000Z (over 2 years ago)
- Last Synced: 2024-12-29T11:16:21.866Z (4 months ago)
- Language: Makefile
- Size: 1.95 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
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"
]
}}
```