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 4.4.0 #576

Merged
merged 127 commits into from
Apr 17, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
127 commits
Select commit Hold shift + click to select a range
b2978de
init: draft
msekania Feb 17, 2024
6e4b799
fix:
msekania Feb 17, 2024
d113f6d
fix:
msekania Feb 17, 2024
19dbad0
fix:
msekania Feb 17, 2024
b47ba10
fix: style
msekania Feb 17, 2024
4ace5cd
fix: folder
msekania Feb 17, 2024
1762edb
fix: folder
msekania Feb 17, 2024
fb805a4
rempove: printout
msekania Feb 17, 2024
f4426e8
fix:
msekania Feb 17, 2024
fb60e85
test: concept
msekania Feb 17, 2024
109356f
fix:
msekania Feb 17, 2024
06fbf28
fix: remove folder
msekania Feb 17, 2024
68613fa
fix: remove folder
msekania Feb 17, 2024
3f372ac
refactor:
msekania Feb 17, 2024
009a981
fix:
msekania Feb 17, 2024
6ca18ec
add: default folder
msekania Feb 17, 2024
bc62d81
fix: folder field
msekania Feb 17, 2024
94181a7
fix: folder field
msekania Feb 17, 2024
96d28f9
fix: folder field
msekania Feb 17, 2024
b1a461d
test
msekania Feb 17, 2024
f4e5e2a
test
msekania Feb 17, 2024
f6eac7f
fix: folder treatment
msekania Feb 17, 2024
8045edd
fix: folder treatment
msekania Feb 17, 2024
02f16e9
fix: cleanup
msekania Feb 17, 2024
8e3f136
check:
msekania Feb 17, 2024
f7267be
test: workaround
msekania Feb 17, 2024
2da1665
cleanup:
msekania Feb 18, 2024
6b9d11a
refactor: remove workaround
msekania Feb 18, 2024
4637a39
cleanup:
msekania Feb 18, 2024
eb13ab1
cleanup:
msekania Feb 18, 2024
fb6f442
add: ~ as a possible default folder
msekania Feb 18, 2024
4cd22d3
add: effective_attributes
msekania Feb 18, 2024
56689a0
fix: style
msekania Feb 18, 2024
7079bf5
refactor:
msekania Feb 18, 2024
6e46732
fix: copy paste
msekania Feb 18, 2024
7afe850
fix: copy paste
msekania Feb 18, 2024
cce2eb3
refactor:
msekania Feb 18, 2024
e4966e2
cleanup:
msekania Feb 18, 2024
9f21b91
add: extend edit msg
msekania Feb 18, 2024
ab07411
fix:
msekania Feb 18, 2024
2bea0f4
fix:
msekania Feb 18, 2024
3d6fbca
test:
msekania Feb 18, 2024
22cc443
fix: test
msekania Feb 18, 2024
c198850
fix: refactor logic of folder field
msekania Feb 18, 2024
4fb4876
fix: ups :
msekania Feb 18, 2024
aee96fa
fix:
msekania Feb 18, 2024
bc9ebdd
fix: cleanup
msekania Feb 18, 2024
3a26e22
cleanup:
msekania Feb 18, 2024
cf73d22
fix: style
msekania Feb 18, 2024
450877c
add: author
msekania Feb 18, 2024
4653caa
fix: copy pase error
msekania Feb 18, 2024
f15a4aa
refactor:
msekania Feb 18, 2024
f03bc2d
init: extend host module to handle clusters and add rename functionality
msekania Feb 20, 2024
c6d3bce
fix: syntax
msekania Feb 20, 2024
c7e7df6
fix: syntax
msekania Feb 20, 2024
0c4e6b2
fix: syntax, style, errors
msekania Feb 20, 2024
8c464c6
fix: style
msekania Feb 20, 2024
baef4f9
fix: errors
msekania Feb 21, 2024
bb68299
fix: style
msekania Feb 21, 2024
6ca0505
fix: style
msekania Feb 21, 2024
a60d433
add: extend tests
msekania Feb 21, 2024
56bf47c
fix: style
msekania Feb 21, 2024
d6e10cf
refactor: is_cluster field
msekania Feb 21, 2024
6fee157
fix: typo
msekania Feb 21, 2024
4467579
cleanup:
msekania Feb 21, 2024
0cfecf3
fix: folder title treatment
msekania Feb 21, 2024
791cd62
cleanup:
msekania Feb 22, 2024
8b8392b
extend: test suite
msekania Feb 22, 2024
d67e021
extend: test suite
msekania Feb 22, 2024
3533228
fix:
msekania Feb 22, 2024
f7a74a2
fix:
msekania Feb 22, 2024
1278646
fix: with folders lookup
msekania Feb 22, 2024
c5ed153
fix: add hack
msekania Feb 22, 2024
2f2ec07
fix:
msekania Feb 22, 2024
aab269b
fix:
msekania Feb 22, 2024
29f5811
fix: logic
msekania Feb 22, 2024
21fd8c8
refactor: simplify test
msekania Feb 22, 2024
1a5800d
test:
msekania Feb 22, 2024
6630278
fix: again copy pase error
msekania Feb 22, 2024
5bd9f00
change: changed status for check mode
msekania Mar 1, 2024
6fff122
change: changed status for check mode
msekania Mar 1, 2024
7795b1c
change: changed status for check mode
msekania Mar 1, 2024
2c5256f
Bump Checkmk versions.
robin-checkmk Mar 5, 2024
7ea95c7
Bump softprops/action-gh-release from 1 to 2
dependabot[bot] Mar 11, 2024
5b63d08
Merge pull request #575 from Checkmk/dependabot/github_actions/devel/…
robin-checkmk Mar 11, 2024
b70ea20
Updating lookup exemple
kirby0025 Mar 12, 2024
2c8fc59
Merge pull request #578 from kirby0025/update_documentation_version_l…
robin-checkmk Mar 13, 2024
1113404
Merge pull request #570 from msekania/fix_folder_title_treatment
robin-checkmk Mar 19, 2024
d66822e
Bump black from 22.3.0 to 24.3.0
dependabot[bot] Mar 20, 2024
4b6ea52
Merge pull request #581 from Checkmk/dependabot/pip/black-24.3.0
robin-checkmk Mar 20, 2024
b0fa7a9
Clean up release.yaml.
thorian93 Mar 23, 2024
953fc23
Comment unnecessary tests.
thorian93 Mar 23, 2024
e426afa
Bump contributor-assistant/github-action from 2.3.1 to 2.3.2
dependabot[bot] Mar 25, 2024
e57d8f8
modify: move and update are exclusive operation
msekania Mar 25, 2024
5044c03
fix: typo
msekania Mar 25, 2024
b53a07f
Merge pull request #583 from Checkmk/dependabot/github_actions/devel/…
robin-checkmk Mar 25, 2024
670489c
Merge pull request #582 from thorian93/devel
robin-checkmk Mar 26, 2024
f09f3d2
Merge pull request #562 from msekania/feature/rewrite_host_module_add…
robin-checkmk Mar 26, 2024
b7caa61
Bugfix changelog.
robin-checkmk Mar 26, 2024
687d90e
Bugfix lookup module examples.
robin-checkmk Mar 26, 2024
aa17309
Add changelogs.
robin-checkmk Mar 26, 2024
4652fb6
Fix documentation.
robin-checkmk Mar 26, 2024
14d887c
Fix typo in EXAMPLES.
robin-checkmk Mar 27, 2024
2761982
update:
msekania Mar 28, 2024
c961c29
fix: typo
msekania Mar 28, 2024
4be1260
fix: linting
msekania Mar 28, 2024
aee961e
fix: bug
msekania Mar 28, 2024
fc3d223
Merge branch 'devel' into feature/add_cluster_managment_to_host_module
msekania Mar 28, 2024
a656f11
fix: cluster to host
msekania Mar 28, 2024
fb89e70
fix: error
msekania Mar 28, 2024
ddb00dd
fix: update node management
msekania Mar 28, 2024
9f40bc3
fix: bug and linting
msekania Mar 28, 2024
8e4886d
fix: linting
msekania Mar 28, 2024
bec901b
fix: typo
msekania Mar 28, 2024
9252ea0
fix: linting
msekania Mar 28, 2024
52d0a04
Add changelog.
robin-checkmk Apr 5, 2024
fbab1ba
refactor: according to @lgetwan comments
msekania Apr 9, 2024
1bf7b13
fix: typo
msekania Apr 9, 2024
d576ef8
fix: typo and linting issues
msekania Apr 9, 2024
948bfa2
Fix failing integration test due to wrong key passphrase. The used pa…
lgetwan Apr 10, 2024
a8046e2
Merge pull request #588 from Checkmk/fix/bakery_integration_test
robin-checkmk Apr 15, 2024
51f6618
Add ignore file for next ansible-core release.
robin-checkmk Apr 15, 2024
6136295
Merge pull request #585 from msekania/feature/add_cluster_managment_t…
robin-checkmk Apr 15, 2024
bde9477
Try to clarify option description.
robin-checkmk Apr 16, 2024
afc6321
Add release summary.
robin-checkmk Apr 16, 2024
0216c37
Bump Checkmk versions.
robin-checkmk Apr 16, 2024
1b08e06
Bump collection version.
robin-checkmk Apr 16, 2024
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
2 changes: 1 addition & 1 deletion .github/workflows/cla.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ jobs:
steps:
- name: 'CLA Assistant'
if: (github.event.comment.body == 'recheck' || github.event.comment.body == 'I have read the CLA Document and I hereby sign the CLA or my organization already has a signed CLA.') || github.event_name == 'pull_request_target'
uses: contributor-assistant/github-action@v2.3.1
uses: contributor-assistant/github-action@v2.3.2
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
# the below token should have repo scope and must be manually added by you in the repository's secret
Expand Down
23 changes: 12 additions & 11 deletions .github/workflows/release.yaml
Original file line number Diff line number Diff line change
@@ -1,14 +1,15 @@
---

env:
NAMESPACE: checkmk
COLLECTION_NAME: general

name: Release Collection

on: # yamllint disable-line rule:truthy
workflow_dispatch:

env:
NAMESPACE: checkmk
COLLECTION_NAME: general
FILES: "ansible.cfg CHANGELOG.rst galaxy.yml LICENSE README.md"
DIRS: "changelogs docs meta playbooks plugins roles"

jobs:

#
Expand Down Expand Up @@ -83,8 +84,8 @@ jobs:
cp $files build/src
cp -rf $directories build/src
env:
files: "ansible.cfg CHANGELOG.rst galaxy.yml LICENSE README.md"
directories: "changelogs docs meta playbooks plugins roles"
files: ${{env.FILES}}
directories: ${{env.DIRS}}

- name: Build Ansible Collection
run: ansible-galaxy collection build build/src --force
Expand All @@ -103,7 +104,7 @@ jobs:
with:
commit-message: Update Docs and Changelogs upon Release
signoff: false
branch: changelogs-docs-update-devel
branch: changelogs-docs-update-${{ steps.current_version.outputs.version }}
base: devel
delete-branch: true
title: '[Auto] Update changelogs and docs upon release'
Expand All @@ -124,15 +125,15 @@ jobs:
cp -rf $directories build/src
rm -rf build/src/roles/*/molecule
env:
files: "CHANGELOG.rst LICENSE README.md ansible.cfg galaxy.yml"
directories: "changelogs docs meta playbooks plugins roles"
files: ${{env.FILES}}
directories: ${{env.DIRS}}

- name: Build Ansible Collection
run: ansible-galaxy collection build build/src --force

- name: Create Release and upload Assets
id: create-release
uses: softprops/action-gh-release@v1
uses: softprops/action-gh-release@v2
with:
token: ${{ secrets.GITHUB_TOKEN }}
draft: false
Expand Down
1 change: 1 addition & 0 deletions SUPPORT.md
Original file line number Diff line number Diff line change
Expand Up @@ -51,3 +51,4 @@ Collection Version | Checkmk Versions | Ansible Versions | Remarks
4.2.0 | 2.0.0p39, 2.1.0p38, 2.2.0p19 | 2.14, 2.15, 2.16 | None
4.3.0 | 2.0.0p39, 2.1.0p39, 2.2.0p22 | 2.14, 2.15, 2.16 | None
4.3.1 | 2.0.0p39, 2.1.0p39, 2.2.0p22 | 2.14, 2.15, 2.16 | None
4.4.0 | 2.0.0p39, 2.1.0p41, 2.2.0p24 | 2.14, 2.15, 2.16 | None
2 changes: 1 addition & 1 deletion changelogs/archive/4.3.0/lookups.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,4 +6,4 @@ minor_changes:
known_issues:
- Lookup modules - When using inventory variables to configure e.g., the server_url,
it is not possible to assign other variables to these variables.
This is a limitation of Ansble itself.
This is a limitation of Ansible itself.
2 changes: 1 addition & 1 deletion changelogs/changelog.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -837,7 +837,7 @@ releases:
known_issues:
- Lookup modules - When using inventory variables to configure e.g., the server_url,
it is not possible to assign other variables to these variables. This is a
limitation of Ansble itself.
limitation of Ansible itself.
minor_changes:
- Folder module - Extend attribute management. Please refer to the module documentation
for more details.
Expand Down
2 changes: 2 additions & 0 deletions changelogs/fragments/bakery.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
bugfixes:
- Bakery module - Fix failing integration test due to wrong key passphrase.
3 changes: 3 additions & 0 deletions changelogs/fragments/folder.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
bugfixes:
- Folder module - Fix issues with uppercase and lowercase names.
- Folder module - Fix issue where the `name` (alias `title`) was entirely ignored.
7 changes: 7 additions & 0 deletions changelogs/fragments/host.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
major_changes:
- Host module - Enable check mode.
- Host module - Add support for cluster hosts.
- Host module - Update attribute management behavior. Refer to the documentation for details.

minor_changes:
- Host module - Migrate module to the new collection API.
1 change: 1 addition & 0 deletions changelogs/fragments/release_summary.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
release_summary: "Spring is here! With a rewritten host module including check mode and cluster support."
5 changes: 3 additions & 2 deletions docs/version_lookup.rst
Original file line number Diff line number Diff line change
Expand Up @@ -385,13 +385,14 @@ Examples

.. code-block:: yaml+jinja


- name: "Show Checkmk version"
debug:
msg: "Server version is {{ version }}"
vars:
version: "{{ lookup('checkmk.general.version',
server_url + '/' + site,
server_url=my_url,
site=my_site,
validate_certs=False,
automation_user=my_user,
automation_secret=my_secret
Expand Down
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: general

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

version: 4.3.1
version: 4.4.0

# The path to the Markdown (.md) readme file. This path is relative to the root of the collection
readme: README.md
Expand Down
12 changes: 6 additions & 6 deletions plugins/lookup/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@ This way, they do not need to be provided at task level.

### Method 1: Environment variables
```bash
export ANSIBLE_LOOKUP_CHECKMK_SERVER_URL="https://myserver"
export ANSIBLE_LOOKUP_CHECKMK_SITE=mysite
export ANSIBLE_LOOKUP_CHECKMK_SERVER_URL="https://my_server"
export ANSIBLE_LOOKUP_CHECKMK_SITE=my_site
export ANSIBLE_LOOKUP_AUTOMATION_USER=automation
export ANSIBLE_LOOKUP_AUTOMATION_SECRET=mysecret
export ANSIBLE_LOOKUP_VALIDATE_CERTS=False
Expand All @@ -16,8 +16,8 @@ export ANSIBLE_LOOKUP_VALIDATE_CERTS=False
### Method 2: In `ansible.cfg`
```ini
[checkmk_lookup]
server_url = https://myserver
site = mysite
server_url = https://my_server
site = my_site
automation_user = automation
automation_secret = mysecret
validate_certs = False
Expand All @@ -30,8 +30,8 @@ validate_certs = False
hosts: localhost
gather_facts: false
vars:
ansible_lookup_checkmk_server_url: "https://myserver"
ansible_lookup_checkmk_site: "mysite"
ansible_lookup_checkmk_server_url: "https://my_server"
ansible_lookup_checkmk_site: "my_site"
ansible_lookup_automation_user: "automation"
ansible_lookup_automation_secret: "mysecret"
ansible_lookup_validate_certs: false
Expand Down
12 changes: 6 additions & 6 deletions plugins/lookup/bakery.py
Original file line number Diff line number Diff line change
Expand Up @@ -89,8 +89,8 @@
msg: "Bakery status is {{ bakery }}"
vars:
bakery: "{{ lookup('checkmk.general.bakery',
server_url=http://myserver,
site=mysite,
server_url=http://my_server,
site=my_site,
validate_certs=False,
automation_user=automation_user,
automation_secret=automation_secret
Expand All @@ -100,10 +100,10 @@
ansible.builtin.debug:
msg: "Bakery status is {{ bakery }}"
vars:
ansible_lookup_checkmk_server_url: "{{ checkmk_var_server_url }}"
ansible_lookup_checkmk_site: "{{ outer_item.site }}"
ansible_lookup_checkmk_automation_user: "{{ checkmk_var_automation_user }}"
ansible_lookup_checkmk_automation_secret: "{{ checkmk_var_automation_secret }}"
ansible_lookup_checkmk_server_url: "http://my_server/"
ansible_lookup_checkmk_site: "my_site"
ansible_lookup_checkmk_automation_user: "my_user"
ansible_lookup_checkmk_automation_secret: "my_secret"
ansible_lookup_checkmk_validate_certs: false
bakery: "{{ lookup('checkmk.general.bakery') }}"
"""
Expand Down
8 changes: 4 additions & 4 deletions plugins/lookup/folder.py
Original file line number Diff line number Diff line change
Expand Up @@ -107,10 +107,10 @@
ansible.builtin.debug:
msg: "Attributes of folder /network: {{ attributes }}"
vars:
ansible_lookup_checkmk_server_url: "{{ checkmk_var_server_url }}"
ansible_lookup_checkmk_site: "{{ outer_item.site }}"
ansible_lookup_checkmk_automation_user: "{{ checkmk_var_automation_user }}"
ansible_lookup_checkmk_automation_secret: "{{ checkmk_var_automation_secret }}"
ansible_lookup_checkmk_server_url: "http://my_server/"
ansible_lookup_checkmk_site: "my_site"
ansible_lookup_checkmk_automation_user: "my_user"
ansible_lookup_checkmk_automation_secret: "my_secret"
ansible_lookup_checkmk_validate_certs: false
attributes: "{{ lookup('checkmk.general.folder', '~tests') }}"
"""
Expand Down
8 changes: 4 additions & 4 deletions plugins/lookup/folders.py
Original file line number Diff line number Diff line change
Expand Up @@ -143,10 +143,10 @@
ansible.builtin.debug:
msg: "Folder tree: {{ item.id }}"
vars:
ansible_lookup_checkmk_server_url: "{{ checkmk_var_server_url }}"
ansible_lookup_checkmk_site: "{{ outer_item.site }}"
ansible_lookup_checkmk_automation_user: "{{ checkmk_var_automation_user }}"
ansible_lookup_checkmk_automation_secret: "{{ checkmk_var_automation_secret }}"
ansible_lookup_checkmk_server_url: "http://my_server/"
ansible_lookup_checkmk_site: "my_site"
ansible_lookup_checkmk_automation_user: "my_user"
ansible_lookup_checkmk_automation_secret: "my_secret"
ansible_lookup_checkmk_validate_certs: false
loop: "{{
lookup('checkmk.general.folders',
Expand Down
8 changes: 4 additions & 4 deletions plugins/lookup/host.py
Original file line number Diff line number Diff line change
Expand Up @@ -114,10 +114,10 @@
ansible.builtin.debug:
msg: "Attributes of host example: {{ attributes }}"
vars:
ansible_lookup_checkmk_server_url: "{{ checkmk_var_server_url }}"
ansible_lookup_checkmk_site: "{{ outer_item.site }}"
ansible_lookup_checkmk_automation_user: "{{ checkmk_var_automation_user }}"
ansible_lookup_checkmk_automation_secret: "{{ checkmk_var_automation_secret }}"
ansible_lookup_checkmk_server_url: "http://my_server/"
ansible_lookup_checkmk_site: "my_site"
ansible_lookup_checkmk_automation_user: "my_user"
ansible_lookup_checkmk_automation_secret: "my_secret"
ansible_lookup_checkmk_validate_certs: false
attributes: "{{ lookup('checkmk.general.host', 'example.com', effective_attributes=True) }}"
"""
Expand Down
8 changes: 4 additions & 4 deletions plugins/lookup/hosts.py
Original file line number Diff line number Diff line change
Expand Up @@ -111,10 +111,10 @@
ansible.builtin.debug:
msg: "Host: {{ item.id }} in folder {{ item.extensions.folder }}, IP: {{ item.extensions.effective_attributes.ipaddress }}"
vars:
ansible_lookup_checkmk_server_url: "{{ checkmk_var_server_url }}"
ansible_lookup_checkmk_site: "{{ outer_item.site }}"
ansible_lookup_checkmk_automation_user: "{{ checkmk_var_automation_user }}"
ansible_lookup_checkmk_automation_secret: "{{ checkmk_var_automation_secret }}"
ansible_lookup_checkmk_server_url: "http://my_server/"
ansible_lookup_checkmk_site: "my_site"
ansible_lookup_checkmk_automation_user: "my_user"
ansible_lookup_checkmk_automation_secret: "my_secret"
ansible_lookup_checkmk_validate_certs: false
loop: "{{
lookup('checkmk.general.hosts', effective_attributes=True) }}"
Expand Down
8 changes: 4 additions & 4 deletions plugins/lookup/rule.py
Original file line number Diff line number Diff line change
Expand Up @@ -107,10 +107,10 @@
ansible.builtin.debug:
msg: "Rule: {{ extensions }}"
vars:
ansible_lookup_checkmk_server_url: "{{ checkmk_var_server_url }}"
ansible_lookup_checkmk_site: "{{ outer_item.site }}"
ansible_lookup_checkmk_automation_user: "{{ checkmk_var_automation_user }}"
ansible_lookup_checkmk_automation_secret: "{{ checkmk_var_automation_secret }}"
ansible_lookup_checkmk_server_url: "http://my_server/"
ansible_lookup_checkmk_site: "my_site"
ansible_lookup_checkmk_automation_user: "my_user"
ansible_lookup_checkmk_automation_secret: "my_secret"
ansible_lookup_checkmk_validate_certs: false
attributes: "{{ lookup('checkmk.general.rule', rule_id='a9285bc1-dcaf-45e0-a3ba-ad398ef06a49') }}"
"""
Expand Down
8 changes: 4 additions & 4 deletions plugins/lookup/rules.py
Original file line number Diff line number Diff line change
Expand Up @@ -136,10 +136,10 @@
ansible.builtin.debug:
msg: "Rule: {{ item.extensions }}"
vars:
ansible_lookup_checkmk_server_url: "{{ checkmk_var_server_url }}"
ansible_lookup_checkmk_site: "{{ outer_item.site }}"
ansible_lookup_checkmk_automation_user: "{{ checkmk_var_automation_user }}"
ansible_lookup_checkmk_automation_secret: "{{ checkmk_var_automation_secret }}"
ansible_lookup_checkmk_server_url: "http://my_server/"
ansible_lookup_checkmk_site: "my_site"
ansible_lookup_checkmk_automation_user: "my_user"
ansible_lookup_checkmk_automation_secret: "my_secret"
ansible_lookup_checkmk_validate_certs: false
loop: "{{
lookup('checkmk.general.rules', ruleset='host_groups') }}"
Expand Down
8 changes: 4 additions & 4 deletions plugins/lookup/ruleset.py
Original file line number Diff line number Diff line change
Expand Up @@ -107,10 +107,10 @@
ansible.builtin.debug:
msg: "Ruleset: {{ extensions }}"
vars:
ansible_lookup_checkmk_server_url: "{{ checkmk_var_server_url }}"
ansible_lookup_checkmk_site: "{{ outer_item.site }}"
ansible_lookup_checkmk_automation_user: "{{ checkmk_var_automation_user }}"
ansible_lookup_checkmk_automation_secret: "{{ checkmk_var_automation_secret }}"
ansible_lookup_checkmk_server_url: "http://my_server/"
ansible_lookup_checkmk_site: "my_site"
ansible_lookup_checkmk_automation_user: "my_user"
ansible_lookup_checkmk_automation_secret: "my_secret"
ansible_lookup_checkmk_validate_certs: false
extensions: "{{ lookup('checkmk.general.ruleset', ruleset='host_groups') }}"
"""
Expand Down
8 changes: 4 additions & 4 deletions plugins/lookup/rulesets.py
Original file line number Diff line number Diff line change
Expand Up @@ -146,10 +146,10 @@
ansible.builtin.debug:
msg: "Ruleset {{ item.extension.name }} is deprecated."
vars:
ansible_lookup_checkmk_server_url: "{{ checkmk_var_server_url }}"
ansible_lookup_checkmk_site: "{{ outer_item.site }}"
ansible_lookup_checkmk_automation_user: "{{ checkmk_var_automation_user }}"
ansible_lookup_checkmk_automation_secret: "{{ checkmk_var_automation_secret }}"
ansible_lookup_checkmk_server_url: "http://my_server/"
ansible_lookup_checkmk_site: "my_site"
ansible_lookup_checkmk_automation_user: "my_user"
ansible_lookup_checkmk_automation_secret: "my_secret"
ansible_lookup_checkmk_validate_certs: false
loop: "{{
lookup('checkmk.general.rulesets', regex='', rulesets_deprecated=True, rulesets_used=True) }}"
Expand Down
11 changes: 6 additions & 5 deletions plugins/lookup/version.py
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,8 @@
msg: "Server version is {{ version }}"
vars:
version: "{{ lookup('checkmk.general.version',
server_url + '/' + site,
server_url=my_url,
site=my_site,
validate_certs=False,
automation_user=my_user,
automation_secret=my_secret
Expand All @@ -99,10 +100,10 @@
ansible.builtin.debug:
msg: "Server version is {{ version }}"
vars:
ansible_lookup_checkmk_server_url: "{{ checkmk_var_server_url }}"
ansible_lookup_checkmk_site: "{{ outer_item.site }}"
ansible_lookup_checkmk_automation_user: "{{ checkmk_var_automation_user }}"
ansible_lookup_checkmk_automation_secret: "{{ checkmk_var_automation_secret }}"
ansible_lookup_checkmk_server_url: "http://my_server/"
ansible_lookup_checkmk_site: "my_site"
ansible_lookup_checkmk_automation_user: "my_user"
ansible_lookup_checkmk_automation_secret: "my_secret"
ansible_lookup_checkmk_validate_certs: false
attributes: "{{ lookup('checkmk.general.version') }}"
"""
Expand Down
4 changes: 2 additions & 2 deletions plugins/modules/bakery.py
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@
automation_user: "my_user"
automation_secret: "my_secret"
signature_key_id: 1
signature_key_passphrase: "secretkey"
signature_key_passphrase: "my_key"
state: "signed"
# Bake and sign all agents.
- name: "Bake and sign all agents."
Expand All @@ -70,7 +70,7 @@
automation_user: "my_user"
automation_secret: "my_secret"
signature_key_id: 1
signature_key_passphrase: "secretkey"
signature_key_passphrase: "my_key"
state: "baked_signed"
"""

Expand Down
10 changes: 7 additions & 3 deletions plugins/modules/folder.py
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@
required: true
type: str
name:
description: The name of your folder. If omitted defaults to the folder name.
description: The name (title) of your folder. If omitted defaults to the string after the last C(/) in I(path).
type: str
aliases: [title]
attributes:
Expand Down Expand Up @@ -220,7 +220,11 @@ def __init__(self, module):
(self.desired["parent"], self.desired["name"]) = self._normalize_path(
self.params.get("path")
)
self.desired["title"] = self.params.get("title", self.desired["name"])

if self.params.get("name"):
self.desired["title"] = self.params.get("name")
else:
self.desired["title"] = self.desired.get("name")

for key in FOLDER:
if self.params.get(key):
Expand Down Expand Up @@ -399,7 +403,7 @@ def _check_output(self, mode):
content="",
etag="",
failed=False,
changed=False,
changed=True,
)

def needs_update(self):
Expand Down
Loading
Loading