Skip to content

Commit

Permalink
Merge pull request #226 from tribe29/devel
Browse files Browse the repository at this point in the history
Release 0.16.0
  • Loading branch information
robin-checkmk authored Jan 20, 2023
2 parents f9a4fe1 + 8655e9c commit 846c9d6
Show file tree
Hide file tree
Showing 29 changed files with 546 additions and 93 deletions.
24 changes: 12 additions & 12 deletions .github/workflows/molecule-role-server.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -8,18 +8,18 @@
name: Molecule Tests for Server Role
on:
workflow_dispatch:
pull_request:
branches:
- main
- devel
paths:
- 'roles/server/**'
push:
branches:
- main
- devel
paths:
- 'roles/server/**'
# pull_request:
# branches:
# - main
# - devel
# paths:
# - 'roles/server/**'
# push:
# branches:
# - main
# - devel
# paths:
# - 'roles/server/**'

env:
NAMESPACE: tribe29
Expand Down
1 change: 1 addition & 0 deletions SUPPORT.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,3 +17,4 @@ Collection Version | Checkmk Versions | Remarks
0.13.0 | 2.1.0p17, 2.0.0p31 | None
0.14.0 | 2.1.0p17, 2.0.0p31 | None
0.15.0 | 2.1.0p18, 2.0.0p32 | None
0.16.0 | 2.1.0p19, 2.0.0p32 | None
4 changes: 2 additions & 2 deletions Vagrantfile
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,6 @@ Vagrant.configure("2") do |config|
pip install -r /vagrant/requirements.txt
sudo -u vagrant ansible-galaxy collection install -f -r /vagrant/requirements.yml
mkdir -p /home/vagrant/ansible_collections/tribe29/checkmk
rsync -avzh /vagrant/* /home/vagrant/ansible_collections/tribe29/checkmk/
mkdir -p /etc/apt/keyrings
curl -fsSL https://download.docker.com/linux/ubuntu/gpg | gpg --dearmor -o /etc/apt/keyrings/docker.gpg
echo "deb [arch=$(dpkg --print-architecture) signed-by=/etc/apt/keyrings/docker.gpg] https://download.docker.com/linux/ubuntu $(lsb_release -cs) stable" | tee /etc/apt/sources.list.d/docker.list > /dev/null
Expand All @@ -40,6 +39,7 @@ Vagrant.configure("2") do |config|
usermod -aG docker vagrant
SCRIPT
srv.vm.provision "shell", inline: $script
srv.vm.synced_folder "./", "/home/vagrant/ansible_collections/tribe29/checkmk/"
end

# Ubuntu
Expand Down Expand Up @@ -104,7 +104,7 @@ end
srv.vm.network "private_network", ip: "192.168.56.65"
srv.ssh.insert_key = false
srv.vm.provider "virtualbox" do |v|
v.name = 'ansuse'
v.name = 'ansles'
v.memory = 2048
v.cpus = 2
end
Expand Down
6 changes: 6 additions & 0 deletions changelogs/fragments/agent.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
# https://docs.ansible.com/ansible/latest/community/development_process.html#changelogs-how-to

minor_changes:
- Agent role - Enable registration for TLS and agent updates on remote sites.
- Agent role - Enable automatic activation of changes when needed for this role. Refer to the README for details.
- Agent role - RedHat - Only try to configure firewalld, if the systemd service is present.
51 changes: 51 additions & 0 deletions changelogs/fragments/bugfix_rule_module.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
# https://docs.ansible.com/ansible/latest/community/development_process.html#changelogs-how-to
bugfixes:
- Rule module - Now properly comparing the specified rule with the existing ones to achieve idempotency.

# minor_changes:
# - Add agent role. Currently supports the vanilla agent.

known_issues:
- Rule module - comparing the specified rule with the existing ones leads to additional changes in CMK's audit log

# - Discovery module is not feature complete yet.
# - Downtime module is not fully idempotent yet. This affects service downtimes and deletions.

## Line Format
# When writing a changelog entry, use the following format:

# - scope - description starting with a lowercase letter and ending with a period at the very end. Multiple sentences are allowed (https://github.com/reference/to/an/issue or, if there is no issue, reference to a pull request itself).

# The scope is usually a module or plugin name or group of modules or plugins, for example, lookup plugins. While module names can (and should) be mentioned directly (foo_module), plugin names should always be followed by the type (foo inventory plugin).

# For changes that are not really scoped (for example, which affect a whole collection), use the following format:

# - Description starting with an uppercase letter and ending with a dot at the very end. Multiple sentences are allowed (https://github.com/reference/to/an/issue or, if there is no issue, reference to a pull request itself).


## Possible keys:

# breaking_changes

# Changes that break existing playbooks or roles. This includes any change to existing behavior that forces users to update tasks. Displayed in both the changelogs and the Porting Guides.
# major_changes

# Major changes to Ansible itself. Generally does not include module or plugin changes. Displayed in both the changelogs and the Porting Guides.
# minor_changes

# Minor changes to Ansible, modules, or plugins. This includes new features, new parameters added to modules, or behavior changes to existing parameters.
# deprecated_features

# Features that have been deprecated and are scheduled for removal in a future release. Displayed in both the changelogs and the Porting Guides.
# removed_features

# Features that were previously deprecated and are now removed. Displayed in both the changelogs and the Porting Guides.
# security_fixes

# Fixes that address CVEs or resolve security concerns. Include links to CVE information.
# bugfixes

# Fixes that resolve issues.
# known_issues

# Known issues that are currently not fixed or will not be fixed.
3 changes: 3 additions & 0 deletions changelogs/fragments/playbooks.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
# https://docs.ansible.com/ansible/latest/community/development_process.html#changelogs-how-to
minor_changes:
- Playbooks - Add use case playbook for registering agents on remote sites.
50 changes: 50 additions & 0 deletions changelogs/fragments/rule_module.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
# https://docs.ansible.com/ansible/latest/community/development_process.html#changelogs-how-to
#bugfixes:
# - Rule module - Now take the folder into account when checking for existing rules.

minor_changes:
- Rule module - Now its possible to choose a position when creating a rule. The ID of the created rule is returned in the task's response.

# known_issues:
# - This release is still in development and a heavy work in progress.
# - Discovery module is not feature complete yet.
# - Downtime module is not fully idempotent yet. This affects service downtimes and deletions.

## Line Format
# When writing a changelog entry, use the following format:

# - scope - description starting with a lowercase letter and ending with a period at the very end. Multiple sentences are allowed (https://github.com/reference/to/an/issue or, if there is no issue, reference to a pull request itself).

# The scope is usually a module or plugin name or group of modules or plugins, for example, lookup plugins. While module names can (and should) be mentioned directly (foo_module), plugin names should always be followed by the type (foo inventory plugin).

# For changes that are not really scoped (for example, which affect a whole collection), use the following format:

# - Description starting with an uppercase letter and ending with a dot at the very end. Multiple sentences are allowed (https://github.com/reference/to/an/issue or, if there is no issue, reference to a pull request itself).


## Possible keys:

# breaking_changes

# Changes that break existing playbooks or roles. This includes any change to existing behavior that forces users to update tasks. Displayed in both the changelogs and the Porting Guides.
# major_changes

# Major changes to Ansible itself. Generally does not include module or plugin changes. Displayed in both the changelogs and the Porting Guides.
# minor_changes

# Minor changes to Ansible, modules, or plugins. This includes new features, new parameters added to modules, or behavior changes to existing parameters.
# deprecated_features

# Features that have been deprecated and are scheduled for removal in a future release. Displayed in both the changelogs and the Porting Guides.
# removed_features

# Features that were previously deprecated and are now removed. Displayed in both the changelogs and the Porting Guides.
# security_fixes

# Fixes that address CVEs or resolve security concerns. Include links to CVE information.
# bugfixes

# Fixes that resolve issues.
# known_issues

# Known issues that are currently not fixed or will not be fixed.
4 changes: 2 additions & 2 deletions galaxy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ name: checkmk

# The version of the collection. Must be compatible with semantic versioning

version: 0.15.0
version: 0.16.0

# The path to the Markdown (.md) readme file. This path is relative to the root of the collection
readme: README.md
Expand All @@ -37,7 +37,7 @@ license_file: LICENSE

# A list of tags you want to associate with the collection for indexing/searching. A tag name has the same character
# requirements as 'namespace' and 'name'
tags: [tribe29, checkmk, monitoring, check_mk, check, discovery]
tags: [tribe29, checkmk, monitoring, check_mk, check, discovery, ubuntu, debian, sles, rhel]

# Collections that this collection requires to be installed for it to be usable. The key of the dict is the
# collection label 'namespace.name'. The value is a version range
Expand Down
10 changes: 8 additions & 2 deletions playbooks/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,17 @@
## Getting started
To get started using these playbooks, you need to create your own [`config.yml`](./vars/config.yml)
in [`./vars/`](./vars/) from the shipped [`config.yml.example`](./vars/config.yml.example). Add the details of your
Checkmk site and call a playbook. Please refer to the following table, which
Checkmk site and call a playbook. Please refer to the following tables, which
playbooks are available and what they do.

## Folders
Name | Description
--- | ---
[vars](./vars/)|Contains variable files. We ship a `config.yml.example` for you to copy.
[usecases](./usecases/)|Contains playbooks for specific use cases.

## Playbooks
Name | Description
--- | ---
[demo.yml](./demo.yml)|Demonstrate the power of this collection against an **empty** demo site. Use this from within this repository.
[test-full.yml](./test-full.yml)|Current testing playbook. Handle with care!
[roles.yml](./roles.yml)|Run the roles contained in this collection. Use the tags `agent` and `server` to limit the run to one role.
47 changes: 47 additions & 0 deletions playbooks/usecases/remote-registration.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
---
# This playbook uses the inventory from the 'playbooks/hosts' file and expects
# an expects an existing site with the below configuration and hosts of the group
# 'vagrant'.

- name: "Register hosts against a remote site. Both for updates and TLS."
hosts: vagrant
vars:
# Basic server and authentication information.
# You have to provide the distributed setup yourself.
checkmk_agent_version: "2.1.0p19"
checkmk_agent_edition: "cre"
checkmk_agent_user: "cmkadmin"
checkmk_agent_pass: "password"
# Here comes the part, where we get into remote registration
checkmk_agent_protocol: http
# The following should be set to the central site.
# This where you configure the host objects.
# Currently the agent package is also pulled from here.
checkmk_agent_server: 192.168.56.1
checkmk_agent_site: "ansible"
# The following should be pointed to the respective remote site.
# This is where the registration will happen.
checkmk_agent_registration_server: "{{ checkmk_agent_server }}"
checkmk_agent_registration_site: ansible_remote_1
# The folder might differ from your remote site name,
# as it is the technical path. Check your configuration for this information.
checkmk_agent_folder: "/remote_1"
# These options need to be enabled for all registrations to work.
# You can however disable the one you do not want to perform.
# But the host needs to be added and changes activated in any case.
checkmk_agent_auto_activate: 'true'
checkmk_agent_update: 'true'
checkmk_agent_tls: 'true'
checkmk_agent_add_host: 'true'
# These are some generic agent options you might want to configure.
checkmk_agent_discover: 'true'
checkmk_agent_force_install: 'true'
checkmk_agent_delegate_api_calls: localhost
checkmk_agent_delegate_download: "{{ inventory_hostname }}"
checkmk_agent_host_name: "{{ inventory_hostname }}"
checkmk_agent_host_folder: "{{ site }}"
checkmk_agent_host_ip: "{{ ansible_host }}"
checkmk_agent_host_attributes:
ipaddress: "{{ checkmk_agent_host_ip | default(omit) }}"
roles:
- agent
Loading

0 comments on commit 846c9d6

Please sign in to comment.