Skip to content

Commit

Permalink
Merge pull request #218 from tribe29/devel
Browse files Browse the repository at this point in the history
Release 0.15.0
  • Loading branch information
robin-checkmk authored Jan 11, 2023
2 parents 73686b2 + 057a4c6 commit a535429
Show file tree
Hide file tree
Showing 30 changed files with 354 additions and 620 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/stale.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ jobs:
pull-requests: write

steps:
- uses: actions/stale@v6
- uses: actions/stale@v7
with:
repo-token: ${{ secrets.GITHUB_TOKEN }}
stale-issue-message: 'This issue has been stale for 60 days. It will close in 7 days.'
Expand Down
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.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
wget "https://download.checkmk.com/checkmk/2.1.0p18/check-mk-raw-2.1.0p18_0.focal_amd64.deb" -O /tmp/checkmk-stable.deb
wget "https://download.checkmk.com/checkmk/2.1.0p18/check-mk-raw-2.1.0p18_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
6 changes: 6 additions & 0 deletions changelogs/fragments/agent_role.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
breaking_changes:
- Agent role - Remove host attribute `tag_agent` from the defaults.
Should not be a breaking change, but be aware of it.

minor_changes:
- Agent role - Respect the variable `checkmk_agent_host_name` when downloading host specific agents.
45 changes: 45 additions & 0 deletions changelogs/fragments/module_options.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
# https://docs.ansible.com/ansible/latest/community/development_process.html#changelogs-how-to

major_changes:
- The host module now uses `name` instead of `host_name`. The latter is retained as an alias but will be removed with a future release.
- The folder module now uses `name` instead of `title`. The latter is retained as an alias until further notice.

## 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.
44 changes: 44 additions & 0 deletions changelogs/fragments/playbooks.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:
- The playbooks shipped with the collection were cleaned up and update. Just for awareness.

## 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.
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.14.0
version: 0.15.0

# The path to the Markdown (.md) readme file. This path is relative to the root of the collection
readme: README.md
Expand Down
134 changes: 128 additions & 6 deletions playbooks/demo.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@
automation_user: "{{ automation_user }}"
automation_secret: "{{ automation_secret }}"
path: "{{ item.path }}"
title: "{{ item.title }}"
name: "{{ item.name }}"
state: "present"
delegate_to: localhost
run_once: 'yes'
Expand All @@ -36,7 +36,7 @@
site: "{{ site }}"
automation_user: "{{ automation_user }}"
automation_secret: "{{ automation_secret }}"
host_name: "{{ inventory_hostname }}"
name: "{{ inventory_hostname }}"
folder: "{{ checkmk_folder_path }}"
attributes:
site: "{{ site }}"
Expand Down Expand Up @@ -91,7 +91,7 @@
site: "{{ site }}"
automation_user: "{{ automation_user }}"
automation_secret: "{{ automation_secret }}"
host_name: "{{ inventory_hostname }}"
name: "{{ inventory_hostname }}"
folder: "{{ checkmk_folder_path }}"
attributes:
site: "{{ site }}"
Expand All @@ -106,7 +106,7 @@
site: "{{ site }}"
automation_user: "{{ automation_user }}"
automation_secret: "{{ automation_secret }}"
host_name: "{{ inventory_hostname }}"
name: "{{ inventory_hostname }}"
folder: "/bar"
state: "present"
delegate_to: localhost
Expand All @@ -130,6 +130,128 @@
"Feel free to review the changes in your Checkmk site: {{ site }}."
"Press <Enter> to continue."
- name: "Downtime 1 - on services with relative times"
downtime:
server_url: "{{ server_url }}"
site: "{{ site }}"
automation_user: "{{ automation_user }}"
automation_secret: "{{ automation_secret }}"
host_name: "{{ inventory_hostname }}"
comment: downtime 1 - on services with relative timestamps
start_after:
hours: 2
minutes: 30
end_after:
hours: 1
minutes: 30
service_descriptions:
- "CPU utilization"
- Memory
delegate_to: localhost

- name: "Downtime 2 - on services with absolute timestamps"
downtime:
server_url: "{{ server_url }}"
site: "{{ site }}"
automation_user: "{{ automation_user }}"
automation_secret: "{{ automation_secret }}"
host_name: "{{ inventory_hostname }}"
comment: downtime 2 - on services with absolute timestamps
start_time: 2024-03-25T20:39:28Z
end_time: 2024-03-26T20:39:28Z
service_descriptions:
- "CPU utilization"
- Memory
delegate_to: localhost

- name: "Downtime 3 - on services without timestamps"
downtime:
server_url: "{{ server_url }}"
site: "{{ site }}"
automation_user: "{{ automation_user }}"
automation_secret: "{{ automation_secret }}"
host_name: "{{ inventory_hostname }}"
comment: downtime 3 - on services without timestamps
service_descriptions:
- "CPU utilization"
- Memory
end_after:
minutes: 1
delegate_to: localhost

- name: "Downtime 4 - on host with relative times"
downtime:
server_url: "{{ server_url }}"
site: "{{ site }}"
automation_user: "{{ automation_user }}"
automation_secret: "{{ automation_secret }}"
host_name: "{{ inventory_hostname }}"
comment: downtime 4 - on host with relative timestamps
start_after:
hours: 2
minutes: 30
end_after:
hours: 1
minutes: 30
delegate_to: localhost

- name: "Downtime 5 - on host with absolute timestamps"
downtime:
server_url: "{{ server_url }}"
site: "{{ site }}"
automation_user: "{{ automation_user }}"
automation_secret: "{{ automation_secret }}"
host_name: "{{ inventory_hostname }}"
comment: downtime 5 - on host with absolute timestamps
start_time: 2024-03-25T20:39:28Z
end_time: 2024-03-26T20:39:28Z
delegate_to: localhost

- name: "Downtime 6 - on host without timestamps"
downtime:
server_url: "{{ server_url }}"
site: "{{ site }}"
automation_user: "{{ automation_user }}"
automation_secret: "{{ automation_secret }}"
host_name: "{{ inventory_hostname }}"
comment: downtime 6 - on host without timestamps
delegate_to: localhost

- name: "Pause to review second set of changes."
ansible.builtin.pause:
prompt: |
"Feel free to review the changes in your Checkmk site: {{ site }}."
"Press <Enter> to continue."
- name: "Downtime delete 1 - service downtimes"
downtime:
server_url: "{{ server_url }}"
site: "{{ site }}"
automation_user: "{{ automation_user }}"
automation_secret: "{{ automation_secret }}"
host_name: "{{ inventory_hostname }}"
service_descriptions:
- "CPU utilization"
- Memory
state: absent
delegate_to: localhost

- name: "Downtime delete 2 - host downtimes"
downtime:
server_url: "{{ server_url }}"
site: "{{ site }}"
automation_user: "{{ automation_user }}"
automation_secret: "{{ automation_secret }}"
host_name: "{{ inventory_hostname }}"
state: absent
delegate_to: localhost

- name: "Pause to review second set of changes."
ansible.builtin.pause:
prompt: |
"Feel free to review the changes in your Checkmk site: {{ site }}."
"Press <Enter> to continue."
- name: "Activate changes on site - Showcase changes to existing objects."
activation:
server_url: "{{ server_url }}"
Expand Down Expand Up @@ -172,7 +294,7 @@
site: "{{ site }}"
automation_user: "{{ automation_user }}"
automation_secret: "{{ automation_secret }}"
host_name: "{{ inventory_hostname }}"
name: "{{ inventory_hostname }}"
folder: "{{ checkmk_folder_path }}"
state: "absent"
delegate_to: localhost
Expand All @@ -184,7 +306,7 @@
automation_user: "{{ automation_user }}"
automation_secret: "{{ automation_secret }}"
path: "{{ item.path }}"
title: "{{ item.title }}"
name: "{{ item.name }}"
state: "absent"
register: testout
delegate_to: localhost
Expand Down
Loading

0 comments on commit a535429

Please sign in to comment.