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

set user_groups in notification to empty list #255

Merged
merged 2 commits into from
Apr 19, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
8 changes: 7 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,9 @@ Additionally all supported modules have an appropriate `*_info`-module to gather

4. An [inventory plugin](plugins/inventory) to use hosts and groups defined in Icinga as a dynamic inventory.

Required Ansible version: 2.9.10
Required Ansible version: 2.14.0

Recommended Icinga-Director version: 2.11.1

## Installation

Expand Down Expand Up @@ -194,6 +196,10 @@ failed: [localhost] => {"ansible_loop_var": "item", "changed": false, "item": "l

## Known Errors with different Director versions

### Director 1.11.1

When creating notifications that contain the `users`-parameter, the task might not be idempotent ([see](https://github.com/Icinga/icingaweb2-module-director/issues/2882)).

### Director 1.11.0

You cannot create usergroups because of invalid property assign_filter ([see](https://github.com/telekom-mms/ansible-collection-icinga-director/issues/228)).
Expand Down
2 changes: 1 addition & 1 deletion meta/runtime.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
---
requires_ansible: '>=2.9.10'
requires_ansible: ">=2.14.0"

action_groups:
icinga:
Expand Down
3 changes: 2 additions & 1 deletion plugins/modules/icinga_notification.py
Original file line number Diff line number Diff line change
Expand Up @@ -121,6 +121,7 @@
- User Groups that should be notified by this notification.
type: "list"
elements: str
default: []
version_added: '1.16.0'
append:
description:
Expand Down Expand Up @@ -225,7 +226,7 @@ def main():
notification_interval=dict(type="int", required=False),
states=dict(type="list", elements="str", required=False),
users=dict(type="list", elements="str", required=False),
user_groups=dict(type="list", elements="str", required=False),
user_groups=dict(type="list", elements="str", default=[], required=False),
types=dict(type="list", elements="str", required=False),
vars=dict(type="dict", default={}, required=False),
period=dict(required=False, aliases=["time_period"]),
Expand Down