Just starting with ansible and have what I believe is a good playbook to add a new host, install and setup the client and plugins, inventory that new host and activate the changes. Anyone see if I’ve gone wrong anywhere here?
(The two ansible.builtin.shell tasks run off some scripts that I use to get the agent installed and registered.)
the checkmk Agent role also contains playbooks for the installation and the tls registration of the agent.
These are very well made and maintained and are build for the most operating Systems, so I would tend to use that instead of your custom scripts.
I am working on figuring out the galaxy collection for this task but I still have some local scripts I need to get on a client so some of my first shot at doing this manually will still be useful.
Anybody got a playbook they can share? I’m apparently just not understanding how the checkmk ansible stuff is used. And I have zero experience using any collections in ansible, so far just been using the builtin stuff.
I’ve tried a few things but none have worked. I think I just need a couple of real world type examples to get over the initial hump.
I want to playbook adding a host to a folder on a site, install the agent on that host along with a few plugins and a couple of local plugins. Register the host for TLS, run discovery and activate all that. I’ll be probably bewriting out a couple of other files and making a couple config changes but I got those steps figured out in a playbook already.
Think I just figured out why nothing seems to be working for me. I recently updated check_mk to 2.3.0p3.cre and the ansible collection seems to only work with 2.2x versions.
I think the best way would be to use the checkmk.general.agent role for initial installation. With that you get an installed agent including TLS registration. After that you can have at it with your preexisting scripts.
This topic was automatically closed 365 days after the last reply. New replies are no longer allowed. Contact an admin if you think this should be re-opened.