Skip to content

Commit

Permalink
Make organization and notification_type not mandatory to match module…
Browse files Browse the repository at this point in the history
… documentation in notification_template (#1006)

* Fix loop label in controller_execution_environments

* Make organization and notification_type not mandatory to match module documentation

These are not mandatory if setting state: absent for removal, so do not make them mandatory in this role
  • Loading branch information
MallocArray authored Dec 12, 2024
1 parent 5c7490b commit c15dc5d
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions roles/controller_notification_templates/tasks/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@
new_name: "{{ __controller_notification_item.new_name | default(omit, true) }}"
copy_from: "{{ __controller_notification_item.copy_from | default(omit, true) }}"
description: "{{ __controller_notification_item.description | default(('' if controller_configuration_notifications_enforce_defaults else omit), true) }}"
organization: "{{ __controller_notification_item.organization.name | default(__controller_notification_item.organization) | mandatory }}"
notification_type: "{{ __controller_notification_item.notification_type | default(omit, true) | mandatory }}"
organization: "{{ __controller_notification_item.organization.name | default(__controller_notification_item.organization) | default(omit, true) }}"
notification_type: "{{ __controller_notification_item.notification_type | default(omit, true) }}"
notification_configuration: "{{ __controller_notification_item.notification_configuration | default(({} if controller_configuration_notifications_enforce_defaults else omit), true) }}"
messages: "{{ __controller_notification_item.messages | default(({} if controller_configuration_notifications_enforce_defaults else omit), true) | regex_replace('{ {', '{_~~remove~~_{') | regex_replace('_~~remove~~_', '') }}"
state: "{{ __controller_notification_item.state | default(platform_state | default('present')) }}"
Expand Down

0 comments on commit c15dc5d

Please sign in to comment.