Skip to content

Commit

Permalink
Merge pull request #198 from tribe29/devel
Browse files Browse the repository at this point in the history
Release 0.13.0
  • Loading branch information
robin-checkmk authored Dec 2, 2022
2 parents 9744617 + 3cdc04e commit fd44f67
Show file tree
Hide file tree
Showing 29 changed files with 978 additions and 31 deletions.
65 changes: 65 additions & 0 deletions .github/workflows/ans-int-test-service_group.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,65 @@
# https://github.com/ansible-collections/collection_template/blob/main/.github/workflows/ansible-test.yml

name: Ansible Integration Tests for Service Group Module
on:
workflow_dispatch:
pull_request:
branches:
- main
- devel
paths:
- 'plugins/modules/service_group.py'

env:
NAMESPACE: tribe29
COLLECTION_NAME: checkmk

jobs:

###
# Integration tests (RECOMMENDED)
#
# https://docs.ansible.com/ansible/latest/dev_guide/testing_integration.html

integration:
runs-on: ubuntu-latest
name: Ⓐ${{ matrix.ansible }}+py${{ matrix.python }}
strategy:
fail-fast: false
matrix:
ansible:
- stable-2.12
- stable-2.13
- devel
python:
- '2.7'
- '3.6'
- '3.7'
- '3.8'
- '3.9'
- '3.10'
- '3.11'
exclude:
# Exclude unsupported sets.
- ansible: stable-2.12
python: '3.11'
- ansible: stable-2.13
python: '3.11'

steps:
- name: Check out code
uses: actions/checkout@v3
with:
path: ansible_collections/${{env.NAMESPACE}}/${{env.COLLECTION_NAME}}

- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: 3.9

- name: Install ansible-base (${{ matrix.ansible }})
run: pip install https://github.com/ansible/ansible/archive/${{ matrix.ansible }}.tar.gz --disable-pip-version-check

- name: Run integration test
run: ansible-test integration service_group -v --color --retry-on-error --continue-on-error --diff --python ${{ matrix.python }} --docker
working-directory: ./ansible_collections/${{env.NAMESPACE}}/${{env.COLLECTION_NAME}}
9 changes: 5 additions & 4 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -86,10 +86,11 @@ Before running the action `Release Collection` against the `main` branch, the
following needs to be done:

1. Update the collection version in `galaxy.yml` and `requirements.yml`. Look for `version:`.
2. Double check `changelogs/fragments` if all changes have a changelog.
3. After all changes have been performed, merge them into the `main` branch.
4. Release the collection by running the action `Release Collection` against the `main` branch.
5. Merge the automatically created pull request and update the `devel` branch from `main`.
2. Update the compatibility matrix in `SUPPORT.md`.
3. Double check `changelogs/fragments` if all changes have a changelog.
4. After all changes have been performed, merge them into the `main` branch.
5. Release the collection by running the action `Release Collection` against the `main` branch.
6. Merge the automatically created pull request and update the `devel` branch from `main`.

## Code of Conduct

Expand Down
9 changes: 9 additions & 0 deletions SUPPORT.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,3 +6,12 @@ This is just a side project and we can only work on this on a **part time and be

Of course you can reach out in the [Checkmk Community (using the 'ansible' tag)](https://forum.checkmk.com/tag/ansible)
or create [issues here](https://github.com/tribe29/ansible-collection-tribe29.checkmk/issues?q=is%3Aissue+is%3Aopen+sort%3Aupdated-desc).

# Compatibility Matrix
The following is a compatibility overview between this collection and Checkmk. We always try to track the most recent Checkmk version. This table will give you an overview which collection versions were tested against which Checkmk versions.
There is of course no guarantees, that there will be no issues at all, but we do our best in testing. On the other hand this obviously does not limit the collection versions to the Checkmk versions mentioned here. Most likely the collection will work with most current Checkmk versions.

Collection Version | Checkmk Versions | Remarks
--- | --- | ---
0.12.0 | 2.1.0p11, 2.0.0p28 | None
0.13.0 | 2.1.0p17, 2.0.0p31 | None
4 changes: 2 additions & 2 deletions Vagrantfile
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,8 @@ Vagrant.configure("2") do |config|
$script = <<-SCRIPT
apt-get update
apt-get install -y python3-pip ca-certificates curl gnupg lsb-release
wget "https://download.checkmk.com/checkmk/2.1.0p13/check-mk-raw-2.1.0p13_0.focal_amd64.deb" -O /tmp/checkmk-stable.deb
wget "https://download.checkmk.com/checkmk/2.1.0p13/check-mk-raw-2.1.0p13_0.focal_amd64.deb" -O /tmp/checkmk-beta.deb
wget "https://download.checkmk.com/checkmk/2.1.0p17/check-mk-raw-2.1.0p17_0.focal_amd64.deb" -O /tmp/checkmk-stable.deb
wget "https://download.checkmk.com/checkmk/2.1.0p17/check-mk-raw-2.1.0p17_0.focal_amd64.deb" -O /tmp/checkmk-beta.deb
apt-get install -y /tmp/checkmk-stable.deb
omd create --admin-password 'd7589df1-01db-4eda-9858-dbcff8d0c361' stable
apt-get install -y /tmp/checkmk-beta.deb
Expand Down
44 changes: 44 additions & 0 deletions changelogs/fragments/new-passwd-hashing.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
# https://docs.ansible.com/ansible/latest/community/development_process.html#changelogs-how-to

minor_changes:
- Agent role - Now supports new password hashing according to L(Werk 14391,https://checkmk.com/werk/14391)

## Line Format

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

# - scope - description starting with a uppercase letter and ending with a period at the very end. Multiple sentences are allowed.

# 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.


## 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: 4 additions & 0 deletions changelogs/fragments/service_group_module.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
# https://docs.ansible.com/ansible/latest/community/development_process.html#changelogs-how-to

major_changes:
- Add service_group module.
2 changes: 1 addition & 1 deletion 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.12.0
version: 0.13.0

# The path to the Markdown (.md) readme file. This path is relative to the root of the collection
readme: README.md
Expand Down
1 change: 1 addition & 0 deletions meta/runtime.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ action_groups:
- rule
- tag_group
- host_group
- service_group
- contact_group

# plugin_routing:
Expand Down
25 changes: 25 additions & 0 deletions playbooks/demo.yml
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,19 @@
state: "fix_all"
delegate_to: localhost

- name: "Create service groups."
service_group:
server_url: "{{ server_url }}"
site: "{{ site }}"
automation_user: "{{ automation_user }}"
automation_secret: "{{ automation_secret }}"
name: "{{ item.name }}"
title: "{{ item.title | default(item.name) }}"
state: "present"
delegate_to: localhost
run_once: true
loop: "{{ checkmk_service_groups_create }}"

- name: "Pause to review first set of changes."
ansible.builtin.pause:
prompt: |
Expand Down Expand Up @@ -129,6 +142,18 @@
delegate_to: localhost
run_once: 'true'

- name: "Delete service groups."
service_group:
server_url: "{{ server_url }}"
site: "{{ site }}"
automation_user: "{{ automation_user }}"
automation_secret: "{{ automation_secret }}"
name: "{{ item.name }}"
state: "absent"
delegate_to: localhost
run_once: true
loop: "{{ checkmk_service_groups_create }}"

- name: "Delete contact groups."
contact_group:
server_url: "{{ server_url }}"
Expand Down
12 changes: 11 additions & 1 deletion playbooks/hosts
Original file line number Diff line number Diff line change
Expand Up @@ -7,4 +7,14 @@ test6.tld checkmk_folder_path="/bar/foo"
test7.tld checkmk_folder_path="/"
test8.tld checkmk_folder_path="/test"
test9.tld checkmk_folder_path="/bar"
test10.tld checkmk_folder_path="/foo"
test10.tld checkmk_folder_path="/foo"

[vagrant]
ansibuntu ansible_host=192.168.56.61
debsible ansible_host=192.168.56.62
anstream ansible_host=192.168.56.63
ansuse ansible_host=192.168.56.64
ansles ansible_host=192.168.56.65

[vagrant:vars]
ansible_user=vagrant
Loading

0 comments on commit fd44f67

Please sign in to comment.