Skip to content

Commit

Permalink
Merge branch 'devel' of github.com:Checkmk/ansible-collection-checkmk…
Browse files Browse the repository at this point in the history
….general into build/add-changelog-to-release
  • Loading branch information
robin-checkmk committed Jun 10, 2024
2 parents fb60b9f + 2c7ef35 commit 044ffa1
Show file tree
Hide file tree
Showing 100 changed files with 1,721 additions and 1,146 deletions.
4 changes: 3 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,13 @@
tribe29-checkmk-*.tar.gz
checkmk-general-*.tar.gz
.vagrant/
.tox/
build/
tests/output
playbooks/vars/config.yml
playbooks/test*.yml
playbooks/hosts
playbooks/hosts.bak
Vagrantfile
Vagrantfile.bak
Vagrantfile.bak
venv
34 changes: 34 additions & 0 deletions CHANGELOG.rst
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,40 @@ checkmk.general Release Notes

.. contents:: Topics

v5.0.0
======

Release Summary
---------------

(Re)writing history with overhauled modules and updated Checkmk, Ansible, Distribution and Python support.

Major Changes
-------------

- Discovery module - The module now fully supports Checkmk 2.3.0. Additionally, two new parameters were introduced, `update_service_labels` and `monitor_undecided_services`. Refer to the module documentation for further details.
- Rule module - The complete module was rewritten to use the new module API. Additionally, a parameter "rule_id" was introduced to modify existing rules. Refer to the module documentation for further details.

Minor Changes
-------------

- Agent role - Add support to open firewall for a list of IPs.
- Agent role - Replace `ansible.builtin.yum` with the succeeding `ansible.builtin.dnf`.
- Server role - Replace `ansible.builtin.yum` with the succeeding `ansible.builtin.dnf`.
- Several modules - Remove unnecessary HTTP codes which get already imported via utils.py.
- Testing - Add Ansible 2.17 to all tests. Be advised, that this Ansible release drops support for Python 2.7 and 3.6.
- Testing - Add Ubuntu 24.04 to the Molecule tests.
- Testing - All tests now cover Checkmk 2.3.0.
- Testing - Remove Ansible 2.14 from all tests, as it is EOL.
- Testing - Remove Checkmk 2.0.0 from all tests, as it is EOL.
- Testing - The Molecule tests now run on Ubuntu 22.04.

Breaking Changes / Porting Guide
--------------------------------

- Agent role - Not really a breaking change, but we removed the internal variable `checkmk_agent_server_ip`. If you set this variable in your inventory, please make sure to update your configuration accordingly!
- Folder lookup module - Return the complete folder information, not only the extensions. To keep the current behavior in your playbooks, you want to use `{{ my_lookup_result.extensions }}` instead of `{{ my_lookup_result }}`.

v4.4.1
======

Expand Down
2 changes: 1 addition & 1 deletion SUPPORT.md
Original file line number Diff line number Diff line change
Expand Up @@ -53,4 +53,4 @@ Collection Version | Checkmk Versions | Ansible Versions | Remarks
4.3.1 | 2.0.0p39, 2.1.0p39, 2.2.0p22 | 2.14, 2.15, 2.16 | None
4.4.0 | 2.0.0p39, 2.1.0p41, 2.2.0p24 | 2.14, 2.15, 2.16 | None
4.4.1 | 2.0.0p39, 2.1.0p41, 2.2.0p24 | 2.14, 2.15, 2.16 | None
5.0.0 | 2.1.0p43, 2.2.0p26, 2.3.0p3 | 2.15, 2.16, 2.17 | Breaking changes to the following modules: `lookup_folder`, `rule`.
5.0.0 | 2.1.0p44, 2.2.0p27, 2.3.0p5 | 2.15, 2.16, 2.17 | Breaking changes to the following modules: `lookup_folder`, `rule` and role: `agent`.
2 changes: 1 addition & 1 deletion changelogs/.plugin-cache.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -126,4 +126,4 @@ plugins:
strategy: {}
test: {}
vars: {}
version: 4.4.1
version: 5.0.0
6 changes: 6 additions & 0 deletions changelogs/archive/5.0.0/agent.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
minor_changes:
- Agent role - Add support to open firewall for a list of IPs.

breaking_changes:
- Agent role - Not really a breaking change, but we removed the internal variable `checkmk_agent_server_ip`.
If you set this variable in your inventory, please make sure to update your configuration accordingly!
Original file line number Diff line number Diff line change
Expand Up @@ -4,3 +4,5 @@ minor_changes:
- Testing - The Molecule tests now run on Ubuntu 22.04.
- Testing - Add Ubuntu 24.04 to the Molecule tests.
- Testing - Remove Ansible 2.14 from all tests, as it is EOL.
- Testing - Add Ansible 2.17 to all tests.
Be advised, that this Ansible release drops support for Python 2.7 and 3.6.
4 changes: 4 additions & 0 deletions changelogs/archive/5.0.0/discovery.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
major_changes:
- Discovery module - The module now fully supports Checkmk 2.3.0.
Additionally, two new parameters were introduced, `update_service_labels` and `monitor_undecided_services`.
Refer to the module documentation for further details.
2 changes: 2 additions & 0 deletions changelogs/archive/5.0.0/http.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
minor_changes:
- Several modules - Remove unnecessary HTTP codes which get already imported via utils.py.
4 changes: 4 additions & 0 deletions changelogs/archive/5.0.0/lookup_folder.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
breaking_changes:
- Folder lookup module - Return the complete folder information, not only the extensions.
To keep the current behavior in your playbooks, you want to use `{{ my_lookup_result.extensions }}`
instead of `{{ my_lookup_result }}`.
1 change: 1 addition & 0 deletions changelogs/archive/5.0.0/release_summary.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
release_summary: "(Re)writing history with overhauled modules and updated Checkmk, Ansible, Distribution and Python support."
3 changes: 3 additions & 0 deletions changelogs/archive/5.0.0/roles.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
minor_changes:
- Agent role - Replace `ansible.builtin.yum` with the succeeding `ansible.builtin.dnf`.
- Server role - Replace `ansible.builtin.yum` with the succeeding `ansible.builtin.dnf`.
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
minor_changes:
major_changes:
- Rule module - The complete module was rewritten to use the new module API.
Additionally, a parameter "rule_id" was introduced to modify existing rules.
Refer to the module documentation for further details.
41 changes: 41 additions & 0 deletions changelogs/changelog.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -901,3 +901,44 @@ releases:
- meta.yml
- release_summary.yml
release_date: '2024-05-01'
5.0.0:
changes:
breaking_changes:
- Agent role - Not really a breaking change, but we removed the internal variable
`checkmk_agent_server_ip`. If you set this variable in your inventory, please
make sure to update your configuration accordingly!
- Folder lookup module - Return the complete folder information, not only the
extensions. To keep the current behavior in your playbooks, you want to use
`{{ my_lookup_result.extensions }}` instead of `{{ my_lookup_result }}`.
major_changes:
- Discovery module - The module now fully supports Checkmk 2.3.0. Additionally,
two new parameters were introduced, `update_service_labels` and `monitor_undecided_services`.
Refer to the module documentation for further details.
- Rule module - The complete module was rewritten to use the new module API.
Additionally, a parameter "rule_id" was introduced to modify existing rules.
Refer to the module documentation for further details.
minor_changes:
- Agent role - Add support to open firewall for a list of IPs.
- Agent role - Replace `ansible.builtin.yum` with the succeeding `ansible.builtin.dnf`.
- Server role - Replace `ansible.builtin.yum` with the succeeding `ansible.builtin.dnf`.
- Several modules - Remove unnecessary HTTP codes which get already imported
via utils.py.
- Testing - Add Ansible 2.17 to all tests. Be advised, that this Ansible release
drops support for Python 2.7 and 3.6.
- Testing - Add Ubuntu 24.04 to the Molecule tests.
- Testing - All tests now cover Checkmk 2.3.0.
- Testing - Remove Ansible 2.14 from all tests, as it is EOL.
- Testing - Remove Checkmk 2.0.0 from all tests, as it is EOL.
- Testing - The Molecule tests now run on Ubuntu 22.04.
release_summary: (Re)writing history with overhauled modules and updated Checkmk,
Ansible, Distribution and Python support.
fragments:
- agent.yml
- build.yml
- discovery.yml
- http.yml
- lookup_folder.yml
- release_summary.yml
- roles.yml
- rule.yml
release_date: '2024-06-07'
3 changes: 0 additions & 3 deletions changelogs/fragments/lookup_folder.yml

This file was deleted.

32 changes: 16 additions & 16 deletions docs/activation_module.rst
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
:trim:

.. meta::
:antsibull-docs: 2.10.0
:antsibull-docs: 2.11.0

.. Anchors
Expand All @@ -23,7 +23,7 @@ checkmk.general.activation module -- Activate changes in Checkmk.
.. Collection note
.. note::
This module is part of the `checkmk.general collection <https://galaxy.ansible.com/ui/repo/published/checkmk/general/>`_ (version 4.4.1).
This module is part of the `checkmk.general collection <https://galaxy.ansible.com/ui/repo/published/checkmk/general/>`_ (version 5.0.0).

It is not included in ``ansible-core``.
To check whether it is installed, run :code:`ansible-galaxy collection list`.
Expand Down Expand Up @@ -400,35 +400,35 @@ Examples

- name: "Start activation on all sites."
checkmk.general.activation:
server_url: "http://my_server/"
site: "my_site"
automation_user: "my_user"
automation_secret: "my_secret"
server_url: "http://myserver/"
site: "mysite"
automation_user: "myuser"
automation_secret: "mysecret"
run_once: 'true'

- name: "Start activation on a specific site."
checkmk.general.activation:
server_url: "http://my_server/"
site: "my_site"
automation_user: "my_user"
automation_secret: "my_secret"
server_url: "http://myserver/"
site: "mysite"
automation_user: "myuser"
automation_secret: "mysecret"
sites:
- "my_site"
- "mysite"
run_once: 'true'

- name: "Start activation including foreign changes."
checkmk.general.activation:
server_url: "http://my_server/"
site: "my_site"
automation_user: "my_user"
automation_secret: "my_secret"
server_url: "http://myserver/"
site: "mysite"
automation_user: "myuser"
automation_secret: "mysecret"
force_foreign_changes: 'true'
run_once: 'true'

- name: "Activate changes including foreign changes and wait for completion."
checkmk.general.activation:
server_url: "http://localhost/"
site: "my_site"
site: "mysite"
automation_user: "automation"
automation_secret: "$SECRET"
redirect: 'true'
Expand Down
16 changes: 8 additions & 8 deletions docs/bakery_lookup.rst
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
:trim:

.. meta::
:antsibull-docs: 2.10.0
:antsibull-docs: 2.11.0

.. Anchors
Expand All @@ -23,7 +23,7 @@ checkmk.general.bakery lookup -- Get the bakery status of a Checkmk server
.. Collection note
.. note::
This lookup plugin is part of the `checkmk.general collection <https://galaxy.ansible.com/ui/repo/published/checkmk/general/>`_ (version 4.4.1).
This lookup plugin is part of the `checkmk.general collection <https://galaxy.ansible.com/ui/repo/published/checkmk/general/>`_ (version 5.0.0).

It is not included in ``ansible-core``.
To check whether it is installed, run :code:`ansible-galaxy collection list`.
Expand Down Expand Up @@ -391,8 +391,8 @@ Examples
msg: "Bakery status is {{ bakery }}"
vars:
bakery: "{{ lookup('checkmk.general.bakery',
server_url=http://my_server,
site=my_site,
server_url=http://myserver,
site=mysite,
validate_certs=False,
automation_user=automation_user,
automation_secret=automation_secret
Expand All @@ -402,10 +402,10 @@ Examples
ansible.builtin.debug:
msg: "Bakery status is {{ bakery }}"
vars:
ansible_lookup_checkmk_server_url: "http://my_server/"
ansible_lookup_checkmk_site: "my_site"
ansible_lookup_checkmk_automation_user: "my_user"
ansible_lookup_checkmk_automation_secret: "my_secret"
ansible_lookup_checkmk_server_url: "http://myserver/"
ansible_lookup_checkmk_site: "mysite"
ansible_lookup_checkmk_automation_user: "myuser"
ansible_lookup_checkmk_automation_secret: "mysecret"
ansible_lookup_checkmk_validate_certs: false
bakery: "{{ lookup('checkmk.general.bakery') }}"

Expand Down
28 changes: 14 additions & 14 deletions docs/bakery_module.rst
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
:trim:

.. meta::
:antsibull-docs: 2.10.0
:antsibull-docs: 2.11.0

.. Anchors
Expand All @@ -23,7 +23,7 @@ checkmk.general.bakery module -- Trigger baking and signing in the agent bakery.
.. Collection note
.. note::
This module is part of the `checkmk.general collection <https://galaxy.ansible.com/ui/repo/published/checkmk/general/>`_ (version 4.4.1).
This module is part of the `checkmk.general collection <https://galaxy.ansible.com/ui/repo/published/checkmk/general/>`_ (version 5.0.0).

It is not included in ``ansible-core``.
To check whether it is installed, run :code:`ansible-galaxy collection list`.
Expand Down Expand Up @@ -389,28 +389,28 @@ Examples
# Bake all agents without signing, as example in a fresh installation without a signature key.
- name: "Bake all agents without signing."
checkmk.general.bakery:
server_url: "http://my_server/"
site: "my_site"
automation_user: "my_user"
automation_secret: "my_secret"
server_url: "http://myserver/"
site: "mysite"
automation_user: "myuser"
automation_secret: "mysecret"
state: "baked"
# Sign all agents.
- name: "Sign all agents."
checkmk.general.bakery:
server_url: "http://my_server/"
site: "my_site"
automation_user: "my_user"
automation_secret: "my_secret"
server_url: "http://myserver/"
site: "mysite"
automation_user: "myuser"
automation_secret: "mysecret"
signature_key_id: 1
signature_key_passphrase: "my_key"
state: "signed"
# Bake and sign all agents.
- name: "Bake and sign all agents."
checkmk.general.bakery:
server_url: "http://my_server/"
site: "my_site"
automation_user: "my_user"
automation_secret: "my_secret"
server_url: "http://myserver/"
site: "mysite"
automation_user: "myuser"
automation_secret: "mysecret"
signature_key_id: 1
signature_key_passphrase: "my_key"
state: "baked_signed"
Expand Down
Loading

0 comments on commit 044ffa1

Please sign in to comment.