Checkmk goes Ansible

And here is the final release of the collection before renaming including redirects to the new collection name.
Do not use this release, if you want to stick with the old naming for now!
The renamed release will follow shortly.

Ladiiiieees and Gentlemen! :studio_microphone:
We proudly present: The renamed Checkmk Ansible Collection! :fireworks:
The version was bumped twice, as each step of the renaming posed a breaking change to users.
The transition is rather easy and you have several options. Check out this thread for more information on how to do it.

From this day forward, you will find the collection in this location: Ansible Galaxy

3 Likes

And here we are, roughly one week after the rename, and just a few days before CMKConf9, we already got the first release in the 2.0.0 branch! :tada:
Do not get confused with the Checkmk versions, this collection is versioned entirely independent. :bowing_man:

In this release, we have some great fixes and improvements:

  • simonhir fixed a bug in the downtime module, where the timezone would be ignored. :hourglass_flowing_sand:
  • @Max migrated both the discovery and bakery module to the new module utils and fixed some bugs along the way. :muscle: He also improved the discovery module so now all modes work properly. :wrench:
3 Likes

Right before the conference, one more release. :partying_face:

Not too much juice in this one, but some fixes and small improvements.

  • We added support for AlmaLinux and Rocky Linux to the roles. :penguin:
  • We reverted a temporary workaround regarding headers sent to the API and implemented the proper solution. :adhesive_bandage:
  • The downtime module now sets a default comment. This did not work before. :wrench:
1 Like

Wow, the conference was a blast and I got to talk and discuss a lot about Ansible there.
Right after talking about Checkmk of course. :wink:

Now we are ready again for another Friday release folks! :sweat_smile:

But this one is packed with features, let me tell you! :firecracker:

  • First and foremost, there is a new and shiny module: The password module! :lock: Shout out to our very own @Max! :partying_face:
  • Secondly there is something with roughly the scale of a new module: The discovery module got support for bulk discoveries, thanks to @sekania! Awesome work, thanks a ton! :tada:
  • Lastly we added support for CentOS 9 and RHEL 9 to the roles, as that slipped by with the last release, and it was pointed out at the conference. Thanks for the hint! :pray:
3 Likes

Sorry to correct you, there is no CentOS 9
it name is:
[

CentOS Stream 9

](CentOS Stream 9)

BR

MF

Of course, you are perfectly right dear Mike! :nerd_face:
However, the way this compatibility Check is implemented does not care about this naming detail. We only look at the distribution name and the version number. That works good enough for the intention.

1 Like

The week starts with a release, which means I once again avoided a Friday release. :smiley:

Here is a quick roundup of what it contains:

  • We added support for Debian 12 and for Oracle Linux 8 (the latter, thanks to @jzuellig! :tada:)
  • We fixed some nasty timeout problems with the discovery module, thanks to (once again :muscle:) @sekania. :partying_face:
  • We added the feature to clean up unused Checkmk versions to the server role. :broom:

There are also some smaller changes and a lot of work went into the CI infrastructure.

2 Likes

This is our first breaking release after the collection renaming. :bomb:

The breaking changes are:

  • Aliases in module options that were deprecated for some time now, have been removed. This includes the following:
    • host module:
      • host_name (use name instead)
    • host_group module:
      • host_group_name (use name instead)
      • host_groups (use groups instead)
    • rule module:
      • folder (use location instead)
  • With Werk 15888 a change was introduced in Checkmk 2.2.0p7 that affects the way the folder module works in a breaking way. You will get a warning, if your Checkmk site is older than Checkmk 2.2.0p7 and an error if it is on 2.2.0p7 or newer, if the following applies: You used more than one of the following options in a single module call: attributes, update_attributes and remove_attributes. Moving forward, these are mutually exclusive and should not be used together.

Apart from these breaking changes a lot of work went into the CI infrastructure once again.

2 Likes

Phew, this was a big one! :mountain:

We worked for quite some time on finalizing Windows support for the agent role and here it is: Release 3.1.0 finally brings the long-awaited feature! :window:
Huge shout-out to @StefanM and our very own @Max! :muscle:
While Stefan did the heavy lifting of creating the initial pull request and creating most of the functionality, Max did the polishing and testing to make sure it meets our standards. :star2:
There might still be issues, mind you, but we are positive, that most of you should get going without much struggle. And if something comes up, do let us know: File an issue on GitHub.

You might think, this is already big enough of an announcement, but hold on! We got one more!
@lars.getwan introduced a first lookup plugin, named version! :microscope: This allows you to easily look up the version of the Checkmk site you are talking to. For details on the usage, look at the plugin itself, or at playbooks/demo/lookup.yml. :eyes:

P.S.: Not a Friday-release! :partying_face:

3 Likes

I had to work with the collection and had to workaround two things. I left comments on github ([FEED] Support CME · Issue #65 · Checkmk/ansible-collection-checkmk.general · GitHub and https://github.com/Checkmk/ansible-collection-checkmk.general/issues/186#issuecomment-1688282693).

And here we are with a Wednesday release. I think that is a first. :wink:

This one includes changes to the agent and server roles:

  • We added support to download a folder-based agent, if no host-specific agent is available, before falling back to the GENERIC agent.
  • We fixed a bug, where registration on remote sites would not work properly.
  • We did some overall cleanup, overhaul, and bug fixing for the agent role and a minor bug fix for the server role.
  • And yet again, our CI got some love.

Overall you should not notice any problems, it is a rather small release. :mouse2:

4 Likes

:tada: Attention: This release is now finally available on galaxy.ansible.com :tada:

Thanks to the Galaxy developers for their support! :pray:


The holiday season hit, and it took some time to get the next release ready. :palm_tree: :beach_umbrella: :cocktail:

Also, the Ansible Galaxy Team released a new codebase to galaxy.ansible.com. This took some looking-into on our end as well. If you experience issues there, read on here for more information: New Ansible Galaxy codebase, URLs to collections on Galaxy change · Issue #59 · ansible-collections/news-for-maintainers · GitHub or head for the Ansible Forum.

Now on to the release: It is packed again with new features. :muscle:

  • @Max added a new module: The time period module. :clock1:
  • @lars.getwan added not one but four new lookup plugins for hosts and folders. :file_folder:
  • @lars.getwan also created a version lookup utility, that can be used in your module code, and was already implemented in the discovery module. :mag:
  • mueller-ma added firewall management support for the agent role. :fire:
  • Additionally it is now possible to manage sites without specifying an admin password. :lock: This can be useful for example, if you did not create the site with Ansible or you want to update a remote site and do not need the admin password. Be careful on site creation though, as without an admin_pw set during creation, a random password will be set. You can of course overwrite it later if you want.
  • We also fixed an issue, where agent registration on a remote site would fail, if the host was just created. :lady_beetle:

Those are the noteworthy changes. The rest is documentation improvement and the usual cleanups. :broom:

4 Likes

Now we are back on track with our releases, so we can proudly present:
The Checkmk Ansible Collection 3.4.0! :partying_face:

This one is feature packed, once again:

  • @hb9hnt added support for the agent in push mode (along with other modes of calling the agent, like SSH). This also fixes a bug, that would prevent the agent role from properly working with agents in push mode. :beetle: Thanks, man! :muscle:
  • S0obi made the logging of the roles better configurable, with focus on security. :lock: Now the roles will by default not log tasks, that contain secrets. This can be disabled for trouleshooting, of course. :scroll:
  • We added support for omd config, which enabled fully automated deployments of Checkmk sites. :robot:
  • @StefanM added initial support for the Checkmk Managed Edition (CME). :busts_in_silhouette: Thanks, buddy! :hugs:

Apart from that, we have the typical built-related changes and minor fixes.

Also, this time the release to the new Galaxy worked flawlessly, so you can install the collection just as you are used to. :metal:

5 Likes

3 posts were split to a new topic: Can the Ansible Collection handle site updates?

Now, this is a big one. Seriously, we have two breaking changes and a new lookup plugin in this release. So strap in and let’s dive. :ocean:

Release 4.0.0 contains - among other things:

  • Standardized variable names. For the up-to-date format see CHANGELOG.md → Style Guide → Roles and Playbooks. As most of these are used internally, most of you should not feel an impact. However, if you hook into any of the variables from e.g., your inventory or extra-vars, double-check the variable names and align them with e.g., using the defaults/main.yml of the role you use.
  • A reworked agent role structure. We consider this a breaking change, as things might be broken for your use case, but we did our very best in testing. So the change should be seamless, and you should not see any changes in the behavior of the role. Nevertheless, we urge you to test the new release before running it in production (as you should always do).
  • Support for Ansible 2.16.0.
  • @Max was on fire this release and added not only the bakery_lookup plugin, but also the following improvements. :fire:
  • Improved error handling for the lookup API. :wrench:
  • Proper support for the redirect option in the activation module. This also gets rid of a nasty workaround in the agent role, where we had to wait for a fixed amount of time, to make sure the activation finished. Now the role can continue, once it gets confirmation of successful activation. :+1:

If you need help, reach out here in the forum, using the ansible tag or if you found an issue, open a report on GitHub.

2 Likes

Just a quick bug fix release 4.0.1
Thanks to mueller-ma for finding this bug. :beetle:

1 Like

Right before the holidays, we have a little present for you. :gift:

:drum:

The Checkmk Ansible Collection 4.1.0! :tada:

Notable changes:

  • @lars.getwan added nearly a handful of new lookup modules for rules and rulesets! :scroll::male_detective:
  • @Max fixed a bug with the password module, which forced the user to provide non-required parameters, and also improved error handling. :hammer_and_wrench:
  • We moved our local test VMs from VirtualBox to KVM/QEMU and added a Makefile. This is probably not as relevant for you reading along, but it makes our development process easier. And maybe for those of you, who do contribute code, it might be worth to take a look there. :eyes:

That being said, happy holidays everyone! :christmas_tree: :fireworks:
Enjoy some time off if you can and spend some time with your loved ones, friends, and family. :hugs:
See you on the other side! :wave:

3 Likes

New year, new Ansible Collection release! :partying_face:

4.2.0 has just been published. And we got some goodies in this one:

  • @Max rewrote the tag_group module entirely and ported it to the new collection API. He also added support to use the help and repair options. :muscle:
  • A joint effort by @marcel.arentz, @lars.getwan and @Max enabled a rewrite of the user module and migration to the new collection API. The rewrite also enabled some additional options, which were not available before. :person_curly_hair::+1:
  • @meni2029 fixed an issue with idempotency in the rule module. Thanks! :pray:
  • mueller-ma fixed an issue in the agent role. Way to go! :metal:
  • We improved the speed of the server role by skipping unnecessary downloads.

While the impact on your use cases should be nearly unnoticeable, we are still very happy with this release, as it moves us forward in the journey to more efficient code. We hope you enjoy this release and we can’t wait to see what the next one brings. Stay tuned and have a wonderful start into 2024! :four_leaf_clover:

6 Likes

4.3.0 has just been published. :tada:

While there are a lot of changes that only affect our CI and testing, there are some things to point out nevertheless:

  • @lars.getwan added the parameter rule_id to the rule module, enabling targeting of specific ruled for modification or deletion. :identification_card:
  • @Max fixed a bug in the user module, where an absent user was created in case the reset_password option was used. :beetle:
  • @lars.getwan also fixed an issue with idempotency in the folder module. :file_folder:
  • @sekania added a nifty feature, that enables usage of environment variables, inventory variables or variables put in ansible.cfg by the lookup modules. This way you do not need to provide authentication on every lookup module call. :partying_face: Refer to the module documentation for further details. :scroll:
  • @sekania made the folder module even more powerful by enabling extended attribute management. :muscle: Refer to the module documentation for further details. :scroll:
  • @sekania (three times in a row, impressive dude! :muscle:) fixed an issue with setting parents on hosts and folders, where a single parent provided as a string would be chopped into single characters. :axe:

That concludes today’s release. Maybe an issue, that has been bugging you as well was fixed, maybe you love the new functionality. One way or another, I hope you like this release. :blush:
It was certainly a piece of work. :muscle:

4 Likes