Skip to content

Commit fd44f67

Browse files
Merge pull request #198 from tribe29/devel
Release 0.13.0
2 parents 9744617 + 3cdc04e commit fd44f67

File tree

29 files changed

+978
-31
lines changed

29 files changed

+978
-31
lines changed
Lines changed: 65 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,65 @@
1+
# https://github.com/ansible-collections/collection_template/blob/main/.github/workflows/ansible-test.yml
2+
3+
name: Ansible Integration Tests for Service Group Module
4+
on:
5+
workflow_dispatch:
6+
pull_request:
7+
branches:
8+
- main
9+
- devel
10+
paths:
11+
- 'plugins/modules/service_group.py'
12+
13+
env:
14+
NAMESPACE: tribe29
15+
COLLECTION_NAME: checkmk
16+
17+
jobs:
18+
19+
###
20+
# Integration tests (RECOMMENDED)
21+
#
22+
# https://docs.ansible.com/ansible/latest/dev_guide/testing_integration.html
23+
24+
integration:
25+
runs-on: ubuntu-latest
26+
name: Ⓐ${{ matrix.ansible }}+py${{ matrix.python }}
27+
strategy:
28+
fail-fast: false
29+
matrix:
30+
ansible:
31+
- stable-2.12
32+
- stable-2.13
33+
- devel
34+
python:
35+
- '2.7'
36+
- '3.6'
37+
- '3.7'
38+
- '3.8'
39+
- '3.9'
40+
- '3.10'
41+
- '3.11'
42+
exclude:
43+
# Exclude unsupported sets.
44+
- ansible: stable-2.12
45+
python: '3.11'
46+
- ansible: stable-2.13
47+
python: '3.11'
48+
49+
steps:
50+
- name: Check out code
51+
uses: actions/checkout@v3
52+
with:
53+
path: ansible_collections/${{env.NAMESPACE}}/${{env.COLLECTION_NAME}}
54+
55+
- name: Set up Python
56+
uses: actions/setup-python@v4
57+
with:
58+
python-version: 3.9
59+
60+
- name: Install ansible-base (${{ matrix.ansible }})
61+
run: pip install https://github.com/ansible/ansible/archive/${{ matrix.ansible }}.tar.gz --disable-pip-version-check
62+
63+
- name: Run integration test
64+
run: ansible-test integration service_group -v --color --retry-on-error --continue-on-error --diff --python ${{ matrix.python }} --docker
65+
working-directory: ./ansible_collections/${{env.NAMESPACE}}/${{env.COLLECTION_NAME}}

CONTRIBUTING.md

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -86,10 +86,11 @@ Before running the action `Release Collection` against the `main` branch, the
8686
following needs to be done:
8787

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

9495
## Code of Conduct
9596

SUPPORT.md

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,3 +6,12 @@ This is just a side project and we can only work on this on a **part time and be
66

77
Of course you can reach out in the [Checkmk Community (using the 'ansible' tag)](https://forum.checkmk.com/tag/ansible)
88
or create [issues here](https://github.com/tribe29/ansible-collection-tribe29.checkmk/issues?q=is%3Aissue+is%3Aopen+sort%3Aupdated-desc).
9+
10+
# Compatibility Matrix
11+
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.
12+
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.
13+
14+
Collection Version | Checkmk Versions | Remarks
15+
--- | --- | ---
16+
0.12.0 | 2.1.0p11, 2.0.0p28 | None
17+
0.13.0 | 2.1.0p17, 2.0.0p31 | None

Vagrantfile

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,8 +20,8 @@ Vagrant.configure("2") do |config|
2020
$script = <<-SCRIPT
2121
apt-get update
2222
apt-get install -y python3-pip ca-certificates curl gnupg lsb-release
23-
wget "https://download.checkmk.com/checkmk/2.1.0p13/check-mk-raw-2.1.0p13_0.focal_amd64.deb" -O /tmp/checkmk-stable.deb
24-
wget "https://download.checkmk.com/checkmk/2.1.0p13/check-mk-raw-2.1.0p13_0.focal_amd64.deb" -O /tmp/checkmk-beta.deb
23+
wget "https://download.checkmk.com/checkmk/2.1.0p17/check-mk-raw-2.1.0p17_0.focal_amd64.deb" -O /tmp/checkmk-stable.deb
24+
wget "https://download.checkmk.com/checkmk/2.1.0p17/check-mk-raw-2.1.0p17_0.focal_amd64.deb" -O /tmp/checkmk-beta.deb
2525
apt-get install -y /tmp/checkmk-stable.deb
2626
omd create --admin-password 'd7589df1-01db-4eda-9858-dbcff8d0c361' stable
2727
apt-get install -y /tmp/checkmk-beta.deb
Lines changed: 44 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,44 @@
1+
# https://docs.ansible.com/ansible/latest/community/development_process.html#changelogs-how-to
2+
3+
minor_changes:
4+
- Agent role - Now supports new password hashing according to L(Werk 14391,https://checkmk.com/werk/14391)
5+
6+
## Line Format
7+
8+
# When writing a changelog entry, use the following format:
9+
10+
# - scope - description starting with a uppercase letter and ending with a period at the very end. Multiple sentences are allowed.
11+
12+
# 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).
13+
14+
# For changes that are not really scoped (for example, which affect a whole collection), use the following format:
15+
16+
# - Description starting with an uppercase letter and ending with a dot at the very end. Multiple sentences are allowed.
17+
18+
19+
## Possible keys:
20+
21+
# breaking_changes
22+
23+
# 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.
24+
# major_changes
25+
26+
# Major changes to Ansible itself. Generally does not include module or plugin changes. Displayed in both the changelogs and the Porting Guides.
27+
# minor_changes
28+
29+
# Minor changes to Ansible, modules, or plugins. This includes new features, new parameters added to modules, or behavior changes to existing parameters.
30+
# deprecated_features
31+
32+
# Features that have been deprecated and are scheduled for removal in a future release. Displayed in both the changelogs and the Porting Guides.
33+
# removed_features
34+
35+
# Features that were previously deprecated and are now removed. Displayed in both the changelogs and the Porting Guides.
36+
# security_fixes
37+
38+
# Fixes that address CVEs or resolve security concerns. Include links to CVE information.
39+
# bugfixes
40+
41+
# Fixes that resolve issues.
42+
# known_issues
43+
44+
# Known issues that are currently not fixed or will not be fixed.
Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
# https://docs.ansible.com/ansible/latest/community/development_process.html#changelogs-how-to
2+
3+
major_changes:
4+
- Add service_group module.

galaxy.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ name: checkmk
1010

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

13-
version: 0.12.0
13+
version: 0.13.0
1414

1515
# The path to the Markdown (.md) readme file. This path is relative to the root of the collection
1616
readme: README.md

meta/runtime.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@ action_groups:
1010
- rule
1111
- tag_group
1212
- host_group
13+
- service_group
1314
- contact_group
1415

1516
# plugin_routing:

playbooks/demo.yml

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -54,6 +54,19 @@
5454
state: "fix_all"
5555
delegate_to: localhost
5656

57+
- name: "Create service groups."
58+
service_group:
59+
server_url: "{{ server_url }}"
60+
site: "{{ site }}"
61+
automation_user: "{{ automation_user }}"
62+
automation_secret: "{{ automation_secret }}"
63+
name: "{{ item.name }}"
64+
title: "{{ item.title | default(item.name) }}"
65+
state: "present"
66+
delegate_to: localhost
67+
run_once: true
68+
loop: "{{ checkmk_service_groups_create }}"
69+
5770
- name: "Pause to review first set of changes."
5871
ansible.builtin.pause:
5972
prompt: |
@@ -129,6 +142,18 @@
129142
delegate_to: localhost
130143
run_once: 'true'
131144

145+
- name: "Delete service groups."
146+
service_group:
147+
server_url: "{{ server_url }}"
148+
site: "{{ site }}"
149+
automation_user: "{{ automation_user }}"
150+
automation_secret: "{{ automation_secret }}"
151+
name: "{{ item.name }}"
152+
state: "absent"
153+
delegate_to: localhost
154+
run_once: true
155+
loop: "{{ checkmk_service_groups_create }}"
156+
132157
- name: "Delete contact groups."
133158
contact_group:
134159
server_url: "{{ server_url }}"

playbooks/hosts

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,4 +7,14 @@ test6.tld checkmk_folder_path="/bar/foo"
77
test7.tld checkmk_folder_path="/"
88
test8.tld checkmk_folder_path="/test"
99
test9.tld checkmk_folder_path="/bar"
10-
test10.tld checkmk_folder_path="/foo"
10+
test10.tld checkmk_folder_path="/foo"
11+
12+
[vagrant]
13+
ansibuntu ansible_host=192.168.56.61
14+
debsible ansible_host=192.168.56.62
15+
anstream ansible_host=192.168.56.63
16+
ansuse ansible_host=192.168.56.64
17+
ansles ansible_host=192.168.56.65
18+
19+
[vagrant:vars]
20+
ansible_user=vagrant

0 commit comments

Comments
 (0)