Home Lab – Automation – Ansible

Simple Custom Messages for GrayLog

I have an alert and notification in Graylog that sends me a slack message when one of my systems runs Alsible pull. (Pulled from Sys Logs)

I do not need a fancy or in depth message, just that X host has run. Here is my custom message.

${foreach event.fields field}

${field.key}: ${field.value} ran ansible at ${event.timestamp}

${end}

I also have a custom field set up under the alert as

template: “${source.source}”require_values: true

Learning GIT Branches, Developing Playbooks.

Over the weekend, I have been learning how to instruct ansible-pull to use a different branch for the git repo with the playbooks. This is my first time with managing a git repository for code development. (GitHub is self hosted) The more that I work with it, the more understanding of how it works, and the more refined my use of the platform will become.

I have also branched the main into a building branch. In this branch, I am tweaking the setup of the playbooks, adjusting the settings that I currently have set. At this moment, I only have a provisioning set of playbooks for provisioning each vm created on XCP-NG. In time, they will be more refined and robust.