Skip to content

Commit

Permalink
Merge pull request #52 from tribe29/devel
Browse files Browse the repository at this point in the history
Release 0.3.3
  • Loading branch information
robin-checkmk authored May 30, 2022
2 parents 9a1b29e + f4b0fbe commit 14315ef
Show file tree
Hide file tree
Showing 7 changed files with 70 additions and 6 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
.*.swp
.*.swo
*~
tribe29-checkmk-*.tar.gz
.vagrant/
build/
tests/output
Expand Down
15 changes: 14 additions & 1 deletion CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,20 @@ at files in the folder `changelogs/archive`.
### Documentation

Documentation is still a work in progress.
For modules please use the inline documentation as seen in the existing modules.
Module documentation is compiled during a release and stored as `docs/module.rst`,
but this is not ideal yet. However, please use the inline documentation as seen
in the existing modules when creating additional modules.

## Releasing this collection
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:`.
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`.

## Code of Conduct

Expand Down
47 changes: 47 additions & 0 deletions changelogs/fragments/trailing_slash.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
# https://docs.ansible.com/ansible/latest/community/development_process.html#changelogs-how-to
bugfixes:
- The host module can now handle the trailing slash in the folder path returned by the REST API.

# known_issues:
# - This release is still in development and a heavy work in progress.
# - Discovery module is not feature complete yet.
# - Downtime module is not fully idempotent yet. This affects service downtimes and deletions.

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

# - scope - description starting with a lowercase letter and ending with a period at the very end. Multiple sentences are allowed (https://github.com/reference/to/an/issue or, if there is no issue, reference to a pull request itself).

# 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 (https://github.com/reference/to/an/issue or, if there is no issue, reference to a pull request itself).


## 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 @@ -9,7 +9,7 @@ namespace: tribe29
name: checkmk

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

# The path to the Markdown (.md) readme file. This path is relative to the root of the collection
readme: README.md
Expand Down
4 changes: 2 additions & 2 deletions plugins/modules/folder.py
Original file line number Diff line number Diff line change
Expand Up @@ -152,8 +152,8 @@ def get_current_folder_state(module, base_url, headers):
else:
exit_failed(
module,
"Error calling API. HTTP code %d. Details: %s. Body: %s"
% (info["status"], info["body"], body),
"Error calling API. HTTP code %d. Details: %s"
% (info["status"], info.get("body", "N/A")),
)

return current_state, current_explicit_attributes, etag
Expand Down
7 changes: 5 additions & 2 deletions plugins/modules/host.py
Original file line number Diff line number Diff line change
Expand Up @@ -143,8 +143,8 @@ def get_current_host_state(module, base_url, headers):
else:
exit_failed(
module,
"Error calling API. HTTP code %d. Details: %s. Body: %s"
% (info["status"], info["body"], body),
"Error calling API. HTTP code %d. Details: %s."
% (info["status"], info.get("body", "N/A")),
)

return current_state, current_explicit_attributes, current_folder, etag
Expand Down Expand Up @@ -281,6 +281,9 @@ def run_module():
headers["If-Match"] = etag
msg_tokens = []

if current_folder.endswith("/"):
current_folder = current_folder.rstrip("/")

if current_folder != module.params["folder"]:
move_host(module, base_url, headers)
msg_tokens.append("Host was moved.")
Expand Down
Binary file removed tribe29-checkmk-0.3.2.tar.gz
Binary file not shown.

0 comments on commit 14315ef

Please sign in to comment.