This page shows how to quickly deploy the Check_MK agent using Ansible.
Standard Ansible role from 2015, deploys plugins and sets up sudo / ssh
Please use the above if you already know Ansible ;)
Create a SSH Key & copy the key
Use SSH-Agent & SSH-Add(key)
Create an ansible inventory:
I think the best way would be to hook into Check_MK and pull out all hosts that have the "tcp" flag.
The following shell command does it.
Alternatively, final.mk might be a good place.
View of the Playbook
(current version, will edit more)
The goal is to fetch the newest agent version and deploy it anywhere but on Ubuntu / ARM systems. (On super-modern ARM systems the /proc/cpuinfo output is different and the default agent would not work)
I found out two things:
ansible_system.lower() didn't work, get_url is not ideal: it can't "replace only if different", this is why i've gone with the following for my example:
dependencies via yum / apt
(move into playbook)
Test agent access
(can also happily from the cookbook)
If there weren't so many ignorant people in the world, this document would be complete already. Instead I've had one more pointless discussion with some autistic nerd that finds himself unable to answer a question if he spotted an error with a detail, which, as sugar on top, would not even matter due to the nature of the question which he would have seen if he were able to read the whole.
Guys, make the world a better place and take your meds.