Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Release 3.2.0 #422

Merged
merged 40 commits into from
Aug 30, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
40 commits
Select commit Hold shift + click to select a range
b022217
Add support for folder-specific agent download.
robin-checkmk Jul 4, 2023
a876708
Set Fact runs now only with enterprise
Max-checkmk Jul 26, 2023
bf9bc87
Merge branch 'devel' of github.com:Checkmk/ansible-collection-checkmk…
robin-checkmk Jul 26, 2023
8ca295c
Fix set_fact and conditional error.
robin-checkmk Jul 26, 2023
9b2b26f
Merge branch 'devel' of github.com:Checkmk/ansible-collection-checkmk…
robin-checkmk Aug 14, 2023
aadcb4e
Bugfix task names.
robin-checkmk Aug 14, 2023
8cd6b8d
Finalize folder awareness.
robin-checkmk Aug 14, 2023
1b61849
Add folder awareness for Windows.
robin-checkmk Aug 14, 2023
f0ab846
Try improving set_fact block.
robin-checkmk Aug 14, 2023
927bba1
Add changelog.
robin-checkmk Aug 14, 2023
24b4410
Improve templating per @msekania.
robin-checkmk Aug 14, 2023
eec35ab
Simplify conditionals.
robin-checkmk Aug 15, 2023
143d11e
Add edition verification and make it case insensitive.
robin-checkmk Aug 15, 2023
5bb0b61
Remove redundant 'Checkmk' from task name.
robin-checkmk Aug 15, 2023
e3c9864
Add missing task to transfer CRE agent in delegated download scenario.
robin-checkmk Aug 15, 2023
188ab87
Bugfix delegated download.
robin-checkmk Aug 15, 2023
cb0fc0f
Bugfix agent download.
robin-checkmk Aug 15, 2023
ef861c2
Bugfix remote registration.
robin-checkmk Aug 17, 2023
e1ff0c3
Merge pull request #416 from Checkmk/fix/issue-414
robin-checkmk Aug 18, 2023
5b2cb8a
Update changelog.
robin-checkmk Aug 22, 2023
f3419b8
Fix typo.
robin-checkmk Aug 22, 2023
deaad5e
Add integration tests for lookup plugin 'version'.
robin-checkmk Aug 22, 2023
02a6e34
Add Max as a collection maintainer.
robin-checkmk Aug 22, 2023
2d97350
Clean up molecule workflows.
robin-checkmk Aug 22, 2023
1063c9a
Merge branch 'devel' of github.com:Checkmk/ansible-collection-checkmk…
robin-checkmk Aug 22, 2023
18bd49e
Merge pull request #412 from Checkmk/feature/simplify-agent-role
robin-checkmk Aug 22, 2023
efa3a44
Re-add missing port to handler.
robin-checkmk Aug 23, 2023
eef29ca
Stop @Max-checkmk's whining.
robin-checkmk Aug 24, 2023
308368e
Merge pull request #421 from Checkmk/feature/add-int-tests-lookup-ver…
robin-checkmk Aug 24, 2023
a7c7566
Merge pull request #382 from Checkmk/feature/agent-download-folder
robin-checkmk Aug 24, 2023
0264d1f
Bump Checkmk version.
robin-checkmk Aug 24, 2023
54bfa61
Enable preflight check for edition.
robin-checkmk Aug 24, 2023
c68529f
Merge pull request #423 from Checkmk/bugfix/add-port-to-handler
robin-checkmk Aug 24, 2023
76b6a73
Merge branch 'devel' of github.com:Checkmk/ansible-collection-checkmk…
robin-checkmk Aug 24, 2023
e375f18
Add lookup labels to labeller.
robin-checkmk Aug 24, 2023
93fadb3
Get rid of mega integration test.
robin-checkmk Aug 24, 2023
2d8508c
Run sanity checks prior to release.
robin-checkmk Aug 24, 2023
aadda90
Add changelog.
robin-checkmk Aug 24, 2023
176b5c2
Fix typos.
robin-checkmk Aug 24, 2023
c31f750
Bump collection version.
robin-checkmk Aug 24, 2023
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 9 additions & 0 deletions .github/labels-issues.yml
Original file line number Diff line number Diff line change
Expand Up @@ -49,3 +49,12 @@ module:tag_group:

module:user:
- 'Component Name: user'

lookup:version:
- 'Component Name: lookup_version'

lookup:folder:
- 'Component Name: lookup_folder'

lookup:folders:
- 'Component Name: lookup_folders'
6 changes: 6 additions & 0 deletions .github/labels-prs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -49,3 +49,9 @@ module:user:

lookup:version:
- 'plugins/modules/lookup/version.py'

lookup:folder:
- 'Component Name: lookup_folder'

lookup:folders:
- 'Component Name: lookup_folders'
2 changes: 2 additions & 0 deletions .github/workflows/ans-int-test-activation.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,8 @@ env:
name: Ansible Integration Tests for Activation Module
on:
workflow_dispatch:
schedule:
- cron: '0 0 * * 0'
pull_request:
branches:
- main
Expand Down
2 changes: 2 additions & 0 deletions .github/workflows/ans-int-test-bakery.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,8 @@ env:
name: Ansible Integration Tests for Bakery Module
on:
workflow_dispatch:
schedule:
- cron: '0 0 * * 0'
pull_request:
branches:
- main
Expand Down
2 changes: 2 additions & 0 deletions .github/workflows/ans-int-test-contact_group.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,8 @@ env:
name: Ansible Integration Tests for Contact Group Module
on:
workflow_dispatch:
schedule:
- cron: '0 0 * * 0'
pull_request:
branches:
- main
Expand Down
2 changes: 2 additions & 0 deletions .github/workflows/ans-int-test-discovery.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,8 @@ env:
name: Ansible Integration Tests for Discovery Module
on:
workflow_dispatch:
schedule:
- cron: '0 0 * * 0'
pull_request:
branches:
- main
Expand Down
2 changes: 2 additions & 0 deletions .github/workflows/ans-int-test-downtime.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,8 @@ env:
name: Ansible Integration Tests for Downtime Module
on:
workflow_dispatch:
schedule:
- cron: '0 0 * * 0'
pull_request:
branches:
- main
Expand Down
2 changes: 2 additions & 0 deletions .github/workflows/ans-int-test-folder.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,8 @@ env:
name: Ansible Integration Tests for Folder Module
on:
workflow_dispatch:
schedule:
- cron: '0 0 * * 0'
pull_request:
branches:
- main
Expand Down
2 changes: 2 additions & 0 deletions .github/workflows/ans-int-test-host.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,8 @@ env:
name: Ansible Integration Tests for Host Module
on:
workflow_dispatch:
schedule:
- cron: '0 0 * * 0'
pull_request:
branches:
- main
Expand Down
2 changes: 2 additions & 0 deletions .github/workflows/ans-int-test-host_group.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,8 @@ env:
name: Ansible Integration Tests for Host Group Module
on:
workflow_dispatch:
schedule:
- cron: '0 0 * * 0'
pull_request:
branches:
- main
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,18 +8,25 @@
env:
NAMESPACE: checkmk
COLLECTION_NAME: general
MODULE_NAME: lookup_version

name: Ansible Integration Tests for all Modules
name: Ansible Integration Tests for Version Lookup Module
on:
workflow_dispatch:
schedule:
- cron: '0 0 * * *'
- cron: '0 0 * * 0'
pull_request:
branches:
- main
- devel
paths:
- 'plugins/lookup/version.py'

jobs:

integration:
runs-on: ubuntu-latest
name: ${{ matrix.module }} (Ⓐ${{ matrix.ansible }}+py${{ matrix.python }})
name: Ⓐ${{ matrix.ansible }}+py${{ matrix.python }}
strategy:
fail-fast: false
matrix:
Expand All @@ -33,20 +40,6 @@ jobs:
- '3.9'
- '3.10'
- '3.11'
module:
- activation
- bakery
- contact_group
- discovery
- downtime
- folder
- host_group
- host
- password
- rule
- service_group
- tag_group
- user
exclude:
# Exclude unsupported sets.
- ansible: stable-2.13
Expand All @@ -73,5 +66,5 @@ jobs:
CHECKMK_DOWNLOAD_PW: ${{ secrets.CHECKMK_DOWNLOAD_PW }}

- name: Run integration test
run: ansible-test integration ${{ matrix.module }} -v --color --retry-on-error --continue-on-error --diff --python ${{ matrix.python }} --docker --coverage
run: ansible-test integration ${{env.MODULE_NAME}} -v --color --retry-on-error --continue-on-error --diff --python ${{ matrix.python }} --docker
working-directory: ./ansible_collections/${{env.NAMESPACE}}/${{env.COLLECTION_NAME}}
2 changes: 2 additions & 0 deletions .github/workflows/ans-int-test-password.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,8 @@ env:
name: Ansible Integration Tests for Password Module
on:
workflow_dispatch:
schedule:
- cron: '0 0 * * 0'
pull_request:
branches:
- main
Expand Down
2 changes: 2 additions & 0 deletions .github/workflows/ans-int-test-rule.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,8 @@ env:
name: Ansible Integration Tests for Rule Module
on:
workflow_dispatch:
schedule:
- cron: '0 0 * * 0'
pull_request:
branches:
- main
Expand Down
2 changes: 2 additions & 0 deletions .github/workflows/ans-int-test-service_group.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,8 @@ env:
name: Ansible Integration Tests for Service Group Module
on:
workflow_dispatch:
schedule:
- cron: '0 0 * * 0'
pull_request:
branches:
- main
Expand Down
2 changes: 2 additions & 0 deletions .github/workflows/ans-int-test-tag_group.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,8 @@ env:
name: Ansible Integration Tests for Tag Group Module
on:
workflow_dispatch:
schedule:
- cron: '0 0 * * 0'
pull_request:
branches:
- main
Expand Down
2 changes: 2 additions & 0 deletions .github/workflows/ans-int-test-user.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,8 @@ env:
name: Ansible Integration Tests for User Module
on:
workflow_dispatch:
schedule:
- cron: '0 0 * * 0'
pull_request:
branches:
- main
Expand Down
1 change: 0 additions & 1 deletion .github/workflows/molecule-role-agent.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -75,6 +75,5 @@ jobs:
- name: "Run Molecule."
run: |
cd roles/agent/
# ln -s ../../requirements.yml requirements.yml
molecule test -s ${{ matrix.checkmk }}
working-directory: ./ansible_collections/${{env.NAMESPACE}}/${{env.COLLECTION_NAME}}
1 change: 0 additions & 1 deletion .github/workflows/molecule-role-server.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -75,6 +75,5 @@ jobs:
- name: "Run Molecule."
run: |
cd roles/server/
# ln -s ../../requirements.yml requirements.yml
molecule test -s ${{ matrix.checkmk }}
working-directory: ./ansible_collections/${{env.NAMESPACE}}/${{env.COLLECTION_NAME}}
37 changes: 37 additions & 0 deletions .github/workflows/release.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,44 @@ on: # yamllint disable-line rule:truthy
workflow_dispatch:

jobs:

#
# Run sanity checks prior to release.
#

sanity:
runs-on: ubuntu-latest
name: Sanity (Ⓐ${{ matrix.ansible }})
strategy:
fail-fast: false
matrix:
ansible:
- stable-2.13
- stable-2.14
- stable-2.15
- devel

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.10' # Ansible 2.13 does not support Python 3.11.

- 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 sanity tests
run: ansible-test sanity --docker -v --color --coverage
working-directory: ./ansible_collections/${{env.NAMESPACE}}/${{env.COLLECTION_NAME}}

release:
needs: sanity
runs-on: ubuntu-latest

steps:
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -123,7 +123,7 @@ See [CONTRIBUTING](CONTRIBUTING.md).
See [CHANGELOG.rst](CHANGELOG.rst).

## Roadmap
<!-- Optional. Include the roadmap for this collection, and the proposed release/versioning strategy so users can anticipate the upgrade/update cycle. -->
<!-- Optional. Include the Roadmap for this collection, and the proposed release/versioning strategy so users can anticipate the upgrade/update cycle. -->
This is merely a collection of possible additions to the role.
Please do **not** consider a concrete planning document!

Expand Down
1 change: 1 addition & 0 deletions SUPPORT.md
Original file line number Diff line number Diff line change
Expand Up @@ -37,3 +37,4 @@ Collection Version | Checkmk Versions | Ansible Versions | Remarks
2.4.1 | 2.0.0p37, 2.1.0p31, 2.2.0p7 | 2.13, 2.14, 2.15 | None
3.0.0 | 2.0.0p38, 2.1.0p32, 2.2.0p7 | 2.13, 2.14, 2.15 | Breaking changes to the following modules: `folder`, `host`, `host_group`, `rule`.
3.1.0 | 2.0.0p38, 2.1.0p32, 2.2.0p7 | 2.13, 2.14, 2.15 | None
3.2.0 | 2.0.0p38, 2.1.0p32, 2.2.0p8 | 2.13, 2.14, 2.15 | None
6 changes: 6 additions & 0 deletions changelogs/fragments/agent.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
minor_changes:
- Agent role - Allow the role to download folder-specific agents.
- Agent role - Add preflight check for correct Checkmk edition.
bugfixes:
- Agent role - Fix agent and update registration on remote sites.
- Agent role - Fix activation handler URL.
2 changes: 2 additions & 0 deletions changelogs/fragments/server.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
minor_changes:
- Server role - Add preflight check for correct Checkmk edition.
3 changes: 2 additions & 1 deletion galaxy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ name: general

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

version: 3.1.0
version: 3.2.0

# The path to the Markdown (.md) readme file. This path is relative to the root of the collection
readme: README.md
Expand All @@ -21,6 +21,7 @@ authors:
- "Marcel Arentz (https://github.com/godspeed-you)"
- "Robin Gierse (https://github.com/robin-checkmk)"
- "Lars Getwan (https://github.com/lgetwan)"
- "Max Sickora (https://github.com/Max-checkmk)"

### OPTIONAL but strongly recommended

Expand Down
2 changes: 1 addition & 1 deletion plugins/lookup/version.py
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
description: automation secret for the REST API access
required: True
validate_certs:
description: Wether or not to validate TLS cerificates
description: Wether or not to validate TLS certificates
type: boolean
required: False
default: True
Expand Down
2 changes: 1 addition & 1 deletion plugins/modules/activation.py
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@
default: []
type: raw
force_foreign_changes:
description: Wheather to active foreign changes.
description: Whether to active foreign changes.
default: false
type: bool

Expand Down
2 changes: 1 addition & 1 deletion roles/agent/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ It can be installed as easy as running:

<!-- A description of the settable variables for this role should go here, including any variables that are in defaults/main.yml, vars/main.yml, and any variables that can/should be set via parameters to the role. Any variables that are read from other roles and/or the global scope (ie. hostvars, group vars, etc.) should be mentioned here as well. -->

checkmk_agent_version: "2.2.0p7"
checkmk_agent_version: "2.2.0p8"

The Checkmk version of your site.

Expand Down
2 changes: 1 addition & 1 deletion roles/agent/defaults/main.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
---
checkmk_agent_version: "2.2.0p7"
checkmk_agent_version: "2.2.0p8"
checkmk_agent_edition: cre
checkmk_agent_protocol: http
checkmk_agent_server: localhost
Expand Down
2 changes: 1 addition & 1 deletion roles/agent/handlers/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
- name: "Activate Changes."
listen: activate changes
checkmk.general.activation:
server_url: "{{ checkmk_agent_protocol }}://{{ checkmk_agent_server }}"
server_url: "{{ checkmk_agent_protocol }}://{{ checkmk_agent_server }}:{{ checkmk_agent_port }}/"
site: "{{ checkmk_agent_site }}"
automation_user: "{{ checkmk_agent_user }}"
automation_secret: "{{ checkmk_agent_auth }}"
Expand Down
2 changes: 1 addition & 1 deletion roles/agent/molecule/2.2.0/group_vars/all.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
---
# General
checkmk_version: "2.2.0p7"
checkmk_version: "2.2.0p8"
checkmk_edition: "cre"
checkmk_site: "my_site"
automation_user: "cmkadmin"
Expand Down
Loading