Skip to content

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

Notifications You must be signed in to change notification settings

devture/com.devture.ansible.role.playbook_runtime_messages

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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:

- 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:

- 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"
        ]
      }}

About

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

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published