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
When I have developed my Ansible playbooks more, I might implement this into my ansible deployment.
https://xen-orchestra.com/blog/virtops3-ansible-with-xen-orchestra
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.
Over this long weekend, I rebuilt my template on Debian Trixie. With having up to date software, there where some changes with cloud-init and ansible running on the first boot. It took a bit of time to figure out the changes. It seems like cloud-init runs the ansible playbooks before/in parallel with the cloud-init generating the ssh keys. Knowing this change, I know that cloud-init is not hung up and completed it work. Another thing that I have learned is that Cloud-init has to be installed for the full initial run of ansible. I have an ansible playbook to remove cloud-init after its initial run.