Skip to content

[BUG] activation module sets changed_when depending on HTTP response code instead of actual changes on the server #987

@davidclemens

Description

@davidclemens

Verify first that your issue is not already reported here.
Where possible also test if the latest release and main branch are affected too. Complete all sections as described!

Describe the bug

A clear and concise description of what the bug is.

When activating changes on a Checkmk server, the activation module seems to set its changed_when according to the HTTP response code that it receives in response to its API request.
I'd expect the changed_when to only be true if there were actual changes activated on the server and false if nothing needed activation on the server.

Component Name

Write the short name of the module or plugin below, use your best guess if unsure. Keeping the below syntax helps us match the issues to labels.

Component Name: activation

Ansible Version

Paste verbatim output from ansible --version between triple backticks.

$ ansible --version
ansible [core 2.17.7]
  config file = None
  configured module search path = [<redacted>]
  ansible python module location = /usr/lib/python3.12/site-packages/ansible
  ansible collection location = <redacted>
  executable location = /usr/bin/ansible
  python version = 3.12.9 (main, Feb  4 2025, 14:38:38) [GCC 13.3.0] (/usr/bin/python3)
  jinja version = 3.1.4
  libyaml = True

Checkmk Version and Edition

Paste the version string, that can be found in the 'Help' menu within Checkmk. Please make sure to include the edition!

Checkmk Raw Edition 2.4.0p4

Collection Version

Paste verbatim output fromansible-galaxy collection list between triple backticks.

$ ansible-galaxy collection list
Collection                               Version
---------------------------------------- -------
checkmk.general                          5.10.0

To Reproduce
Steps to reproduce the behavior:

  • Scenario A: Actual changes were activated on the server
  1. Make some changes to the server that require activation
  2. Use the checkmk.general.activation module to activate the changes on the server
  • Scenario B: No actual changes were activated on the server
  1. Make no changes to the server that require activation
  2. Use the checkmk.general.activation module to activate the changes on the server

Expected behavior

A clear and concise description of what you expected to happen.

  • Scenario A: I expect the changed_when to be true
  • Scenario B: I expect the changed_when to be false

Actual behavior

A clear and concise description of what actually happens.

  • Scenario A: changed_when is true (because the HTTP request was OK (return code 200))
  • Scenario B: changed_when is true (because the HTTP request was OK (return code 200))

Minimum reproduction example

If you can, please provide a minimum example of your configuration. This really helps us quickly understand the situation.

Additional context

Add any other context, e.g. OS information about control and managed node, screenshots or background information about the problem.

Metadata

Metadata

Assignees

Labels

bugSomething isn't workingmodule:activationThis affects the activation module

Type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions