Skip to content
This repository was archived by the owner on Nov 6, 2024. It is now read-only.
Open
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: 4 additions & 4 deletions LWRP.md
Original file line number Diff line number Diff line change
Expand Up @@ -1329,7 +1329,7 @@ LWRP `notificationcommand` creates an icinga `NotificationCommand` object.

```ruby
icinga2_notificationcommand 'mail-service-notification' do
command ['ConfigDir + "/icinga2/scripts/mail-service-notification.sh"']
command ['ConfigDir + "/scripts/mail-service-notification.sh"']
env 'NOTIFICATIONTYPE' => '$notification.type$', \
'SERVICEDESC' => '$service.name$',\
'HOSTALIAS' => '$host.display_name$',\
Expand Down Expand Up @@ -1370,9 +1370,9 @@ LWRP `apilistener` creates an icinga `ApiListener` object.

```ruby
icinga2_apilistener 'master' do
cert_path 'ConfigDir + "/icinga2/pki/" + NodeName + ".crt"'
key_path 'ConfigDir + "/icinga2/pki/" + NodeName + ".key"'
ca_path 'ConfigDir + "/icinga2/pki/ca.crt"'
cert_path 'ConfigDir + "/pki/" + NodeName + ".crt"'
key_path 'ConfigDir + "/pki/" + NodeName + ".key"'
ca_path 'ConfigDir + "/pki/ca.crt"'
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

These paths have been deprecated in 2.8. While at it, think about a possible change here to /var/lib... as well.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

https://github.com/Icinga/icinga2/blob/master/doc/16-upgrading-icinga-2.md#upgrading-to-v28- oh shoot.

Icinga 2 automatically migrates the certificates to the new default location if they are configured and detected in /etc/icinga2/pki.

makes it sound like Icinga is papering over that under the covers, at least. I kind of want to address that in a separate PR.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It has been sitting there, but likely not forever. Just wanted to mention it, thanks for taking care :)

bind_host 'host address'
bind_port '5665'
ticket_salt 'TicketSalt'
Expand Down
4 changes: 2 additions & 2 deletions examples/icinga2_server/recipes/notificationcommand.rb
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
#

icinga2_notificationcommand 'mail-service-notification' do
command ['ConfigDir + "/icinga2/scripts/mail-service-notification.sh"']
command ['ConfigDir + "/scripts/mail-service-notification.sh"']
env 'NOTIFICATIONTYPE' => '$notification.type$', \
'SERVICEDESC' => '$service.name$',\
'HOSTALIAS' => '$host.display_name$',\
Expand All @@ -35,7 +35,7 @@
end

icinga2_notificationcommand 'mail-host-notification' do
command ['ConfigDir + "/icinga2/scripts/mail-host-notification.sh"']
command ['ConfigDir + "/scripts/mail-host-notification.sh"']
env 'NOTIFICATIONTYPE' => '$notification.type$',
'HOSTALIAS' => '$host.display_name$',
'HOSTADDRESS' => '$address$',
Expand Down
4 changes: 2 additions & 2 deletions recipes/objects.rb
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@

# notificationcommand objects
icinga2_notificationcommand 'mail-service-notification' do
command ['ConfigDir + "/icinga2/scripts/mail-service-notification.sh"']
command ['ConfigDir + "/scripts/mail-service-notification.sh"']
env 'NOTIFICATIONTYPE' => '$notification.type$', \
'SERVICEDESC' => '$service.name$',\
'HOSTALIAS' => '$host.display_name$',\
Expand All @@ -67,7 +67,7 @@
end

icinga2_notificationcommand 'mail-host-notification' do
command ['ConfigDir + "/icinga2/scripts/mail-host-notification.sh"']
command ['ConfigDir + "/scripts/mail-host-notification.sh"']
env 'NOTIFICATIONTYPE' => '$notification.type$', \
'SERVICEDESC' => '$service.name$',\
'HOSTALIAS' => '$host.display_name$',\
Expand Down