Page Menu
Home
Software Heritage
Search
Configure Global Search
Log In
Files
F8391094
zone.pp
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Flag For Later
Size
1 KB
Subscribers
None
zone.pp
View Options
define
icinga2
::
object
::
zone
(
$zone
=
$title,
$endpoints
=
[],
$parent
=
undef
,
$global
=
false
,
$target
=
undef
,
$order
=
'20'
,
)
{
include
::
icinga2
::
params
$conf_dir
=
$::icinga2::params::conf_dir
# validation
validate_string
(
$zone)
validate_integer
(
$order)
if
$endpoints
{
validate_array
(
$endpoints)
}
if
$parent
{
validate_string
(
$parent)
}
if
$global
{
validate_bool
(
$global)
}
# set defaults and validate
if
$target
{
validate_absolute_path
(
$target)
$_target
=
$target
}
else
{
$_target
=
"${conf_dir}/zones.conf"
}
# compose the attributes
if
$global
{
$attrs
=
{
global
=>
$global,
}
}
else
{
$attrs
=
{
endpoints
=>
$endpoints,
parent
=>
$parent,
}
}
# create object
icinga2
::
object
{
"zone::${title}"
:
object_name
=>
$zone,
object_type
=>
'Zone'
,
attrs
=>
$attrs,
target
=>
$_target,
order
=>
$order,
notify
=>
Class
[
'::icinga2::service'
],
}
}
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Jun 4 2025, 6:38 PM (14 w, 4 d ago)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
3398670
Attached To
rSPICI Icinga 2 Puppet Module
Event Timeline
Log In to Comment