Skip to content

Commit

Permalink
Merge pull request #177 from tribe29/devel
Browse files Browse the repository at this point in the history
Release 0.12.0
  • Loading branch information
robin-checkmk committed Nov 18, 2022
2 parents edf09d2 + 980c910 commit 8e07939
Show file tree
Hide file tree
Showing 35 changed files with 1,099 additions and 112 deletions.
65 changes: 65 additions & 0 deletions .github/workflows/ans-int-test-contact_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 Contact Group Module
on:
workflow_dispatch:
pull_request:
branches:
- main
- devel
paths:
- 'plugins/modules/contact_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 contact_group -v --color --retry-on-error --continue-on-error --diff --python ${{ matrix.python }} --docker
working-directory: ./ansible_collections/${{env.NAMESPACE}}/${{env.COLLECTION_NAME}}
1 change: 1 addition & 0 deletions .github/workflows/ansible-sanity-tests.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,7 @@ jobs:
sanity:
name: Sanity (Ⓐ${{ matrix.ansible }})
strategy:
fail-fast: false
matrix:
ansible:
- stable-2.11
Expand Down
4 changes: 2 additions & 2 deletions CHANGELOG.rst
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ Bugfixes
--------

- Host module - Do not raise an error, if a host already exists, or on updating a host's attributes while the hosts stays in the same folder.
- Server role - Fix and enhance additional repository handling on RedHat derivates.
- Server role - Fix and enhance additional repository handling on RedHat derivatives.

v0.8.0
======
Expand All @@ -77,7 +77,7 @@ Minor Changes
- Downtime module - Make certificate validation of the Checkmk server configurable.
- Folder module - Make certificate validation of the Checkmk server configurable.
- Host module - Make certificate validation of the Checkmk server configurable.
- Server role - Fix setup file verification on Debian derivates. Using gpg instead of dpkg-sig now.
- Server role - Fix setup file verification on Debian derivatives. Using gpg instead of dpkg-sig now.

v0.7.0
======
Expand Down
5 changes: 3 additions & 2 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,10 +20,11 @@ out there and we love seeing you add to that plethora of it!

## How to contribute

There is several ways in which you can contribute:
There are several ways in which you can contribute:

1. Submit an [issue](#Submitting-Issues).
2. Create a [pull request](#Pull-Requests).
3. Pick an [issue, which needs help](https://github.com/tribe29/ansible-collection-tribe29.checkmk/issues?q=is%3Aissue+is%3Aopen+label%3A%22help+wanted%22).

Everything helps, really!
We do test everything to the best of our abilities, but nothing beats real world
Expand Down Expand Up @@ -84,7 +85,7 @@ Releasing this collection is automated using GitHub Actions.
Before running the action `Release Collection` against the `main` branch, the
following needs to be done:

1. Update the collection version in `galaxy.yml`. Look for `version:`.
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.
Expand Down
2 changes: 1 addition & 1 deletion changelogs/archive/0.8.0/server_role.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# https://docs.ansible.com/ansible/latest/community/development_process.html#changelogs-how-to

minor_changes:
- Server role - Fix setup file verification on Debian derivates. Using gpg instead of dpkg-sig now.
- Server role - Fix setup file verification on Debian derivatives. Using gpg instead of dpkg-sig now.

# known_issues:
# - This release is still in development and a heavy work in progress.
Expand Down
2 changes: 1 addition & 1 deletion changelogs/archive/0.9.0/server_role.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ minor_changes:
- Server role - Add handlers to ensure the system apache is started after installation.

bugfixes:
- Server role - Fix and enhance additional repository handling on RedHat derivates.
- Server role - Fix and enhance additional repository handling on RedHat derivatives.

# known_issues:
# - This release is still in development and a heavy work in progress.
Expand Down
4 changes: 2 additions & 2 deletions changelogs/changelog.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -255,7 +255,7 @@ releases:
- Downtime module - Make certificate validation of the Checkmk server configurable.
- Folder module - Make certificate validation of the Checkmk server configurable.
- Host module - Make certificate validation of the Checkmk server configurable.
- Server role - Fix setup file verification on Debian derivates. Using gpg instead
- Server role - Fix setup file verification on Debian derivatives. Using gpg instead
of dpkg-sig now.
fragments:
- agent_role.yml
Expand All @@ -267,7 +267,7 @@ releases:
bugfixes:
- Host module - Do not raise an error, if a host already exists, or on updating
a host's attributes while the hosts stays in the same folder.
- Server role - Fix and enhance additional repository handling on RedHat derivates.
- Server role - Fix and enhance additional repository handling on RedHat derivatives.
minor_changes:
- Server role - Improve OS support detection and enhance prerequisites installation.
fragments:
Expand Down
48 changes: 48 additions & 0 deletions changelogs/fragments/bugfixes.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
# https://docs.ansible.com/ansible/latest/community/development_process.html#changelogs-how-to

bugfixes:
- Agent role - Fix timeouts on tasks delegated_to localhost.

minor_changes:
- Agent role - Add option to download agent setup to control node and then upload to target.
- Downtime module - Improve readability of messages in case of API errors.

## 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/contact_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 contact_group module.
3 changes: 3 additions & 0 deletions changelogs/fragments/fix-188-key-error.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
bugfixes:
- Downtime module - A human-readable error message is now printed if there's an API error.
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.11.0
version: 0.12.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
- contact_group

# plugin_routing:
# modules:
Expand Down
27 changes: 26 additions & 1 deletion playbooks/demo.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
delegate_to: localhost
run_once: 'true'

- name: "Create folders."
- name: "Create folder."
folder:
server_url: "{{ server_url }}"
site: "{{ site }}"
Expand Down Expand Up @@ -98,6 +98,19 @@
state: "present"
delegate_to: localhost

- name: "Create contact groups."
contact_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_contact_groups_create }}"

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

- name: "Delete contact groups."
contact_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_contact_groups_create }}"

- name: "Delete Host."
host:
server_url: "{{ server_url }}"
Expand Down
4 changes: 4 additions & 0 deletions plugins/doc_fragments/common.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,4 +22,8 @@ class ModuleDocFragment(object):
description: The secret to authenticate your automation user.
required: true
type: str
validate_certs:
description: Whether to validate the SSL certificate of the Checkmk server.
default: true
type: bool
"""
4 changes: 0 additions & 4 deletions plugins/modules/activation.py
Original file line number Diff line number Diff line change
Expand Up @@ -32,10 +32,6 @@
description: Wheather to active foreign changes.
default: false
type: bool
validate_certs:
description: Whether to validate the SSL certificate of the Checkmk server.
default: true
type: bool
author:
- Robin Gierse (@robin-tribe29)
Expand Down
Loading

0 comments on commit 8e07939

Please sign in to comment.