diff --git a/REFERENCE.md b/REFERENCE.md index 76e38110..5f042fc0 100644 --- a/REFERENCE.md +++ b/REFERENCE.md @@ -264,7 +264,7 @@ Default value: `true` ##### `features` -Data type: `Array` +Data type: `Array[String[1]]` List of features to activate. Defaults to [checker, mainlog, notification]. @@ -278,7 +278,7 @@ Default value: `true` ##### `constants` -Data type: `Hash` +Data type: `Hash[String[1], Any]` Hash of constants. Defaults are set in the params class. Your settings will be merged with the defaults. @@ -286,13 +286,13 @@ Default value: `{}` ##### `plugins` -Data type: `Array` +Data type: `Array[String[1]]` A list of the ITL plugins to load. Defaults to [ 'plugins', 'plugins-contrib', 'windows-plugins', 'nscp' ]. ##### `confd` -Data type: `Variant[Boolean, String]` +Data type: `Variant[Boolean, String[1]]` `conf.d` is the directory where Icinga 2 stores its object configuration by default. To disable it, set this parameter to `false`. By default this parameter is `true`. It's also possible to assign your @@ -439,7 +439,7 @@ Default value: `undef` ##### `ssl_cert` -Data type: `Optional[String]` +Data type: `Optional[String[1]]` The certificate in a base64 encoded string to store in cert directory This parameter requires pki to be set to 'none'. @@ -448,7 +448,7 @@ Default value: `undef` ##### `ssl_cacert` -Data type: `Optional[String]` +Data type: `Optional[String[1]]` The CA root certificate in a base64 encoded string to store in cert directory. This parameter requires pki to be set to 'none'. @@ -535,7 +535,7 @@ Default value: `undef` ##### `endpoints` -Data type: `Hash[String, Hash]` +Data type: `Hash[String[1], Hash]` Hash to configure endpoint objects. `NodeName` is a icnga2 constant. @@ -543,7 +543,7 @@ Default value: `{ 'NodeName' => {} }` ##### `zones` -Data type: `Hash[String, Hash]` +Data type: `Hash[String[1], Hash]` Hash to configure zone objects. `ZoneName` and `NodeName` are icinga2 constants. @@ -575,7 +575,7 @@ Default value: `undef` ##### `ssl_cipher_list` -Data type: `Optional[String]` +Data type: `Optional[String[1]]` List of allowed TLS ciphers, to finetune encryption. @@ -599,7 +599,7 @@ Default value: `undef` ##### `access_control_allow_origin` -Data type: `Optional[Array[String]]` +Data type: `Optional[Array[String[1]]]` Specifies an array of origin URLs that may access the API. @@ -615,7 +615,7 @@ Default value: `undef` ##### `access_control_allow_headers` -Data type: `Optional[String]` +Data type: `Optional[String[1]]` Used in response to a preflight request to indicate which HTTP headers can be used when making the actual request. @@ -631,7 +631,7 @@ Default value: `undef` ##### `environment` -Data type: `Optional[String]` +Data type: `Optional[String[1]]` Used as suffix in TLS SNI extension name; default from constant ApiEnvironment, which is empty. @@ -809,7 +809,7 @@ Default value: `undef` ##### `index` -Data type: `Optional[String]` +Data type: `Optional[String[1]]` Elasticsearch index name. @@ -817,7 +817,7 @@ Default value: `undef` ##### `username` -Data type: `Optional[String]` +Data type: `Optional[String[1]]` Elasticsearch user name. @@ -881,7 +881,7 @@ Default value: `undef` ##### `ssl_cert` -Data type: `Optional[String]` +Data type: `Optional[String[1]]` The client certificate in PEM format. Only valid if ssl is enabled. @@ -889,7 +889,7 @@ Default value: `undef` ##### `ssl_cacert` -Data type: `Optional[String]` +Data type: `Optional[String[1]]` The CA root certificate in PEM format. Only valid if ssl is enabled. @@ -913,7 +913,7 @@ Default value: `undef` ##### `flush_threshold` -Data type: `Optional[Integer]` +Data type: `Optional[Integer[0]]` How many data points to buffer before forcing a transfer to Elasticsearch. @@ -976,7 +976,7 @@ Default value: `undef` ##### `source` -Data type: `Optional[String]` +Data type: `Optional[String[1]]` Source name for this instance. @@ -1024,7 +1024,7 @@ Default value: `undef` ##### `ssl_cert` -Data type: `Optional[String]` +Data type: `Optional[String[1]]` The client certificate in PEM format. Only valid if ssl is enabled. @@ -1032,7 +1032,7 @@ Default value: `undef` ##### `ssl_cacert` -Data type: `Optional[String]` +Data type: `Optional[String[1]]` The CA certificate in PEM format. Only valid if ssl is enabled. @@ -1118,7 +1118,7 @@ Default value: `undef` ##### `host_name_template` -Data type: `Optional[String]` +Data type: `Optional[String[1]]` Template for metric path of hosts. @@ -1126,7 +1126,7 @@ Default value: `undef` ##### `service_name_template` -Data type: `Optional[String]` +Data type: `Optional[String[1]]` Template for metric path of services. @@ -1294,7 +1294,7 @@ Default value: `undef` ##### `tls_cert` -Data type: `Optional[String]` +Data type: `Optional[String[1]]` The certificate in a PEM format string to store spicified in tls_cert_file. Only valid if tls is enabled. @@ -1303,7 +1303,7 @@ Default value: `undef` ##### `tls_cacert` -Data type: `Optional[String]` +Data type: `Optional[String[1]]` The CA root certificate in a PEM formated string to store spicified in tls_cacert_file. Only valid if tls is enabled. @@ -1312,7 +1312,7 @@ Default value: `undef` ##### `tls_capath` -Data type: `Optional[String]` +Data type: `Optional[String[1]]` Path to all trusted CA certificates. Only valid if tls is enabled. @@ -1320,7 +1320,7 @@ Default value: `undef` ##### `tls_cipher` -Data type: `Optional[String]` +Data type: `Optional[String[1]]` List of allowed ciphers. Only valid if tls is enabled. @@ -1328,7 +1328,7 @@ Default value: `undef` ##### `tls_protocolmin` -Data type: `Optional[String]` +Data type: `Optional[String[1]]` Minimum TLS protocol version like `TLSv1.2`. Only valid if tls is enabled. @@ -1432,7 +1432,7 @@ Default value: `undef` ##### `user` -Data type: `String` +Data type: `String[1]` MySQL database user with read/write permission to the icinga database. @@ -1448,7 +1448,7 @@ Default value: `undef` ##### `database` -Data type: `String` +Data type: `String[1]` MySQL database name. @@ -1496,7 +1496,7 @@ Default value: `undef` ##### `ssl_cert` -Data type: `Optional[String]` +Data type: `Optional[String[1]]` The client certificate in PEM format. Only valid if ssl is enabled. @@ -1504,7 +1504,7 @@ Default value: `undef` ##### `ssl_cacert` -Data type: `Optional[String]` +Data type: `Optional[String[1]]` The CA root certificate in PEM format. Only valid if ssl is enabled. @@ -1520,7 +1520,7 @@ Default value: `undef` ##### `ssl_cipher` -Data type: `Optional[String]` +Data type: `Optional[String[1]]` MySQL SSL list of allowed ciphers. Only valid if ssl is enabled. @@ -1528,7 +1528,7 @@ Default value: `undef` ##### `table_prefix` -Data type: `Optional[String]` +Data type: `Optional[String[1]]` MySQL database table prefix. @@ -1536,7 +1536,7 @@ Default value: `undef` ##### `instance_name` -Data type: `Optional[String]` +Data type: `Optional[String[1]]` Unique identifier for the local Icinga 2 instance. @@ -1544,7 +1544,7 @@ Default value: `undef` ##### `instance_description` -Data type: `Optional[String]` +Data type: `Optional[String[1]]` Description for the Icinga 2 instance. @@ -1670,7 +1670,7 @@ Default value: `undef` ##### `user` -Data type: `String` +Data type: `String[1]` PostgreSQL database user with read/write permission to the icinga database. @@ -1686,7 +1686,7 @@ Default value: `undef` ##### `database` -Data type: `String` +Data type: `String[1]` PostgreSQL database name. @@ -1739,7 +1739,7 @@ Default value: `undef` ##### `ssl_cert` -Data type: `Optional[String]` +Data type: `Optional[String[1]]` The client certificate in PEM format. Only valid if ssl_mode is set unequal to `disabled`. @@ -1747,7 +1747,7 @@ Default value: `undef` ##### `ssl_cacert` -Data type: `Optional[String]` +Data type: `Optional[String[1]]` The CA root certificate in PEM format. Only valid if ssl_mode is set unequal to `disabled`. @@ -1755,7 +1755,7 @@ Default value: `undef` ##### `table_prefix` -Data type: `Optional[String]` +Data type: `Optional[String[1]]` PostgreSQL database table prefix. @@ -1763,7 +1763,7 @@ Default value: `undef` ##### `instance_name` -Data type: `Optional[String]` +Data type: `Optional[String[1]]` Unique identifier for the local Icinga 2 instance. @@ -1771,7 +1771,7 @@ Default value: `undef` ##### `instance_description` -Data type: `Optional[String]` +Data type: `Optional[String[1]]` Description of the Icinga 2 instance. @@ -1889,7 +1889,7 @@ Default value: `undef` ##### `database` -Data type: `Optional[String]` +Data type: `Optional[String[1]]` InfluxDB database name. @@ -1897,7 +1897,7 @@ Default value: `undef` ##### `username` -Data type: `Optional[String]` +Data type: `Optional[String[1]]` InfluxDB user name. @@ -1969,7 +1969,7 @@ Default value: `undef` ##### `ssl_cert` -Data type: `Optional[String]` +Data type: `Optional[String[1]]` The client certificate in PEM format. Only valid if ssl is enabled. @@ -1977,7 +1977,7 @@ Default value: `undef` ##### `ssl_cacert` -Data type: `Optional[String]` +Data type: `Optional[String[1]]` The CA root certificate in PEM format. Only valid if ssl is enabled. @@ -1985,7 +1985,7 @@ Default value: `undef` ##### `host_measurement` -Data type: `String` +Data type: `String[1]` The value of this is used for the measurement setting in host_template. @@ -1993,7 +1993,7 @@ Default value: `'$host.check_command$'` ##### `host_tags` -Data type: `Hash` +Data type: `Hash[String[1], String[1]]` Tags defined in this hash will be set in the host_template. @@ -2001,7 +2001,7 @@ Default value: `{ hostname => '$host.name$' }` ##### `service_measurement` -Data type: `String` +Data type: `String[1]` The value of this is used for the measurement setting in host_template. @@ -2009,7 +2009,7 @@ Default value: `'$service.check_command$'` ##### `service_tags` -Data type: `Hash` +Data type: `Hash[String[1], String[1]]` Tags defined in this hash will be set in the service_template. @@ -2126,13 +2126,13 @@ Default value: `undef` ##### `organization` -Data type: `String` +Data type: `String[1]` InfluxDB organization name. ##### `bucket` -Data type: `String` +Data type: `String[1]` InfluxDB bucket name. @@ -2192,7 +2192,7 @@ Default value: `undef` ##### `ssl_cert` -Data type: `Optional[String]` +Data type: `Optional[String[1]]` The client certificate in PEM format. Only valid if ssl is enabled. @@ -2200,7 +2200,7 @@ Default value: `undef` ##### `ssl_cacert` -Data type: `Optional[String]` +Data type: `Optional[String[1]]` The CA root certificate in PEM format. Only valid if ssl is enabled. @@ -2208,7 +2208,7 @@ Default value: `undef` ##### `host_measurement` -Data type: `String` +Data type: `String[1]` The value of this is used for the measurement setting in host_template. @@ -2216,7 +2216,7 @@ Default value: `'$host.check_command$'` ##### `host_tags` -Data type: `Hash` +Data type: `Hash[String[1], String[1]]` Tags defined in this hash will be set in the host_template. @@ -2224,7 +2224,7 @@ Default value: `{ hostname => '$host.name$' }` ##### `service_measurement` -Data type: `String` +Data type: `String[1]` The value of this is used for the measurement setting in host_template. @@ -2232,7 +2232,7 @@ Default value: `'$service.check_command$'` ##### `service_tags` -Data type: `Hash` +Data type: `Hash[String[1], String[1]]` Tags defined in this hash will be set in the service_template. @@ -2509,7 +2509,7 @@ Default value: `undef` ##### `host_format_template` -Data type: `Optional[String]` +Data type: `Optional[String[1]]` Host Format template for the performance data file. @@ -2517,7 +2517,7 @@ Default value: `undef` ##### `service_format_template` -Data type: `Optional[String]` +Data type: `Optional[String[1]]` Service Format template for the performance data file. @@ -2711,7 +2711,7 @@ The following parameters are available in the `icinga2::query_objects` class: ##### `destination` -Data type: `String` +Data type: `String[1]` Destination equal to what was set in parameter `export` for objects. @@ -2719,7 +2719,7 @@ Default value: `$facts['networking']['fqdn']` ##### `environments` -Data type: `Array[String]` +Data type: `Array[String[1]]` limits the response to objects of these environments if set, all environments if list is empty @@ -2875,7 +2875,7 @@ Default value: `present` ##### `apiuser_name` -Data type: `String` +Data type: `String[1]` Set the name of the apiuser object. @@ -2891,7 +2891,7 @@ Default value: `undef` ##### `client_cn` -Data type: `Optional[String]` +Data type: `Optional[String[1]]` Optional. Client Common Name (CN). @@ -2915,7 +2915,7 @@ first time. ##### `order` -Data type: `Variant[String, Integer]` +Data type: `Variant[String[1], Integer[0]]` String or integer to set the position in the target file, sorted alpha numeric. @@ -2923,7 +2923,7 @@ Default value: `30` ##### `export` -Data type: `Variant[Array[String], String]` +Data type: `Variant[Array[String[1]], String[1]]` Export object to destination, collected by class `icinga2::query_objects`. @@ -2960,7 +2960,7 @@ Default value: `present` ##### `checkcommand_name` -Data type: `String` +Data type: `String[1]` Title of the CheckCommand object. @@ -2968,7 +2968,7 @@ Default value: `$title` ##### `import` -Data type: `Array` +Data type: `Array[String[1]]` Sorted List of templates to include. @@ -2976,7 +2976,7 @@ Default value: `[]` ##### `command` -Data type: `Optional[Variant[Array, String]]` +Data type: `Optional[Variant[Array, String[1]]]` The command. This can either be an array of individual command arguments. Alternatively a string can be specified in which case the shell interpreter (usually /bin/sh) takes care of parsing the command. @@ -2986,7 +2986,7 @@ Default value: `undef` ##### `env` -Data type: `Optional[Hash]` +Data type: `Optional[Hash[String[1], Any]]` A dictionary of macros which should be exported as environment variables prior to executing the command. @@ -3035,7 +3035,7 @@ Default value: `false` ##### `order` -Data type: `Variant[String, Integer]` +Data type: `Variant[String[1], Integer[0]]` String or integer to set the position in the target file, sorted alpha numeric. @@ -3043,7 +3043,7 @@ Default value: `15` ##### `export` -Data type: `Variant[Array[String], String]` +Data type: `Variant[Array[String[1]], String[1]]` Export object to destination, collected by class `icinga2::query_objects`. @@ -3073,7 +3073,7 @@ Default value: `present` ##### `checkresultreader_name` -Data type: `String` +Data type: `String[1]` Set the Icinga 2 name of the ceckresultreader object. @@ -3096,7 +3096,7 @@ first time. ##### `order` -Data type: `Variant[String, Integer]` +Data type: `Variant[String[1], Integer[0]]` String or integer to set the position in the target file, sorted alpha numeric. @@ -3142,7 +3142,7 @@ Default value: `present` ##### `dependency_name` -Data type: `String` +Data type: `String[1]` Set the Icinga 2 name of the dependency object. @@ -3150,7 +3150,7 @@ Default value: `$title` ##### `parent_host_name` -Data type: `Optional[String]` +Data type: `Optional[String[1]]` The parent host. @@ -3158,7 +3158,7 @@ Default value: `undef` ##### `parent_service_name` -Data type: `Optional[String]` +Data type: `Optional[String[1]]` The parent service. If omitted, this dependency object is treated as host dependency. @@ -3167,7 +3167,7 @@ Default value: `undef` ##### `child_host_name` -Data type: `Optional[String]` +Data type: `Optional[String[1]]` The child host. @@ -3175,7 +3175,7 @@ Default value: `undef` ##### `child_service_name` -Data type: `Optional[String]` +Data type: `Optional[String[1]]` The child service. If omitted, this dependency object is treated as host dependency. @@ -3210,7 +3210,7 @@ Default value: `undef` ##### `period` -Data type: `Optional[String]` +Data type: `Optional[String[1]]` Time period during which this dependency is enabled. @@ -3226,7 +3226,7 @@ Default value: `undef` ##### `apply` -Data type: `Variant[Boolean, String]` +Data type: `Variant[Boolean, String[1]]` Dispose an apply instead an object if set to 'true'. Value is taken as statement, i.e. 'vhost => config in host.vars.vhosts'. @@ -3235,7 +3235,7 @@ Default value: `false` ##### `prefix` -Data type: `Variant[Boolean, String]` +Data type: `Variant[Boolean, String[1]]` Set dependency_name as prefix in front of 'apply for'. Only effects if apply is a string. @@ -3252,7 +3252,7 @@ Default value: `'Host'` ##### `assign` -Data type: `Array` +Data type: `Array[String[1]]` Assign user group members using the group assign rules. @@ -3260,7 +3260,7 @@ Default value: `[]` ##### `ignore` -Data type: `Array` +Data type: `Array[String[1]]` Exclude users using the group ignore rules. @@ -3276,7 +3276,7 @@ Default value: `false` ##### `import` -Data type: `Array` +Data type: `Array[String[1]]` Sorted List of templates to include. @@ -3291,7 +3291,7 @@ first time. ##### `order` -Data type: `Variant[String, Integer]` +Data type: `Variant[String[1], Integer[0]]` String or integer to set the position in the target file, sorted alpha numeric. @@ -3299,7 +3299,7 @@ Default value: `70` ##### `export` -Data type: `Variant[Array[String], String]` +Data type: `Variant[Array[String[1]], String[1]]` Export object to destination, collected by class `icinga2::query_objects`. @@ -3332,7 +3332,7 @@ Default value: `present` ##### `endpoint_name` -Data type: `String` +Data type: `String[1]` Set the Icinga 2 name of the endpoint object. @@ -3376,7 +3376,7 @@ Default value: `undef` ##### `order` -Data type: `Variant[String, Integer]` +Data type: `Variant[String[1], Integer[0]]` String or integer to set the position in the target file, sorted alpha numeric. @@ -3384,7 +3384,7 @@ Default value: `40` ##### `export` -Data type: `Variant[Array[String], String]` +Data type: `Variant[Array[String[1]], String[1]]` Export object to destination, collected by class `icinga2::query_objects`. @@ -3420,7 +3420,7 @@ Default value: `present` ##### `eventcommand_name` -Data type: `String` +Data type: `String[1]` Set the Icinga 2 name of the eventcommand object. @@ -3464,7 +3464,7 @@ Default value: `undef` ##### `arguments` -Data type: `Optional[Hash]` +Data type: `Optional[Variant[Hash, String]]` A dictionary of command arguments. @@ -3479,7 +3479,7 @@ first time. ##### `import` -Data type: `Array` +Data type: `Array[String[1]]` Sorted List of templates to include. @@ -3487,7 +3487,7 @@ Default value: `[]` ##### `order` -Data type: `Variant[String, Integer]` +Data type: `Variant[String[1], Integer[0]]` String or integer to set the position in the target file, sorted alpha numeric. @@ -3495,7 +3495,7 @@ Default value: `20` ##### `export` -Data type: `Variant[Array[String], String]` +Data type: `Variant[Array[String[1]], String[1]]` Export object to destination, collected by class `icinga2::query_objects`. @@ -3555,7 +3555,7 @@ Default value: `present` ##### `host_name` -Data type: `String` +Data type: `String[1]` Hostname of the Host object. @@ -3563,7 +3563,7 @@ Default value: `$title` ##### `import` -Data type: `Array` +Data type: `Array[String[1]]` Sorted List of templates to include. @@ -3571,7 +3571,7 @@ Default value: `[]` ##### `display_name` -Data type: `Optional[String]` +Data type: `Optional[String[1]]` A short description of the host (e.g. displayed by external interfaces instead of the name if set). @@ -3605,7 +3605,7 @@ Default value: `undef` ##### `groups` -Data type: `Optional[Array]` +Data type: `Optional[Array[String[1]]]` A list of host groups this host belongs to. @@ -3613,7 +3613,7 @@ Default value: `undef` ##### `check_command` -Data type: `Optional[String]` +Data type: `Optional[String[1]]` The name of the check command. @@ -3629,7 +3629,7 @@ Default value: `undef` ##### `check_period` -Data type: `Optional[String]` +Data type: `Optional[String[1]]` The name of a time period which determines when this host should be checked. @@ -3709,7 +3709,7 @@ Default value: `undef` ##### `event_command` -Data type: `Optional[String]` +Data type: `Optional[String[1]]` The name of an event command that should be executed every time the host's state changes or the host is in a SOFT state. @@ -3742,7 +3742,7 @@ Default value: `undef` ##### `zone` -Data type: `Optional[String]` +Data type: `Optional[String[1]]` The zone this object is a member of. @@ -3750,7 +3750,7 @@ Default value: `undef` ##### `command_endpoint` -Data type: `Optional[String]` +Data type: `Optional[String[1]]` The endpoint where commands are executed on. @@ -3758,7 +3758,7 @@ Default value: `undef` ##### `notes` -Data type: `Optional[String]` +Data type: `Optional[String[1]]` Notes for the host. @@ -3766,7 +3766,7 @@ Default value: `undef` ##### `notes_url` -Data type: `Optional[String]` +Data type: `Optional[String[1]]` Url for notes for the host (for example, in notification commands). @@ -3774,7 +3774,7 @@ Default value: `undef` ##### `action_url` -Data type: `Optional[String]` +Data type: `Optional[String[1]]` Url for actions for the host (for example, an external graphing tool). @@ -3782,7 +3782,7 @@ Default value: `undef` ##### `icon_image` -Data type: `Optional[String]` +Data type: `Optional[String[1]]` Icon image for the host. Used by external interfaces only. @@ -3790,7 +3790,7 @@ Default value: `undef` ##### `icon_image_alt` -Data type: `Optional[String]` +Data type: `Optional[String[1]]` Icon image description for the host. Used by external interface only. @@ -3813,7 +3813,7 @@ first time. ##### `order` -Data type: `Variant[String, Integer]` +Data type: `Variant[String[1], Integer[0]]` String or integer to set the position in the target file, sorted alpha numeric. @@ -3821,7 +3821,7 @@ Default value: `50` ##### `export` -Data type: `Variant[Array[String], String]` +Data type: `Variant[Array[String[1]], String[1]]` Export object to destination, collected by class `icinga2::query_objects`. @@ -3868,7 +3868,7 @@ Default value: `present` ##### `hostgroup_name` -Data type: `String` +Data type: `String[1]` Namevar of the hostgroup. @@ -3876,7 +3876,7 @@ Default value: `$title` ##### `display_name` -Data type: `Optional[String]` +Data type: `Optional[String[1]]` A short description of the host group. @@ -3892,7 +3892,7 @@ Default value: `undef` ##### `assign` -Data type: `Array` +Data type: `Array[String[1]]` Assign host group members using the group rules. @@ -3900,7 +3900,7 @@ Default value: `[]` ##### `ignore` -Data type: `Array` +Data type: `Array[String[1]]` Ignore host group members using the group rules. @@ -3915,7 +3915,7 @@ first time. ##### `order` -Data type: `Variant[String, Integer]` +Data type: `Variant[String[1], Integer[0]]` String or integer to set the position in the target file, sorted alpha numeric. @@ -3923,7 +3923,7 @@ Default value: `55` ##### `export` -Data type: `Variant[Array[String], String]` +Data type: `Variant[Array[String[1]], String[1]]` Export object to destination, collected by class `icinga2::query_objects`. @@ -3961,7 +3961,7 @@ Default value: `present` ##### `app_name` -Data type: `String` +Data type: `String[1]` Set the Icinga 2 name of the IcingaApplication object. @@ -4027,7 +4027,7 @@ Default value: `undef` ##### `environment` -Data type: `Optional[String]` +Data type: `Optional[String[1]]` Specify the Icinga environment. This overrides the Environment constant specified in the configuration or on the CLI with --define. @@ -4045,7 +4045,7 @@ Default value: `undef` ##### `order` -Data type: `Variant[String, Integer]` +Data type: `Variant[String[1], Integer[0]]` String or integer to control the position in the target file, sorted alpha numeric. @@ -4053,7 +4053,7 @@ Default value: `5` ##### `export` -Data type: `Variant[Array[String], String]` +Data type: `Variant[Array[String[1]], String[1]]` Export object to destination, collected by class `icinga2::query_objects`. @@ -4102,7 +4102,7 @@ Default value: `present` ##### `notification_name` -Data type: `String` +Data type: `String[1]` Set the Icinga 2 name of the notification object. @@ -4110,7 +4110,7 @@ Default value: `$title` ##### `host_name` -Data type: `Optional[String]` +Data type: `Optional[String[1]]` The name of the host this notification belongs to. @@ -4118,7 +4118,7 @@ Default value: `undef` ##### `service_name` -Data type: `Optional[String]` +Data type: `Optional[String[1]]` The short name of the service this notification belongs to. If omitted, this notification object is treated as host notification. @@ -4137,7 +4137,7 @@ Default value: `undef` ##### `users` -Data type: `Optional[Variant[String, Array]]` +Data type: `Optional[Variant[String[1], Array[String[1]]]]` A list of user names who should be notified. @@ -4145,7 +4145,7 @@ Default value: `undef` ##### `user_groups` -Data type: `Optional[Variant[String, Array]]` +Data type: `Optional[Variant[String[1], Array[String[1]]]]` A list of user group names who should be notified. @@ -4153,7 +4153,7 @@ Default value: `undef` ##### `times` -Data type: `Optional[Hash]` +Data type: `Optional[Hash[String[1], Any]]` A dictionary containing begin and end attributes for the notification. @@ -4161,7 +4161,7 @@ Default value: `undef` ##### `command` -Data type: `Optional[String]` +Data type: `Optional[String[1]]` The name of the notification command which should be executed when the notification is triggered. @@ -4179,7 +4179,7 @@ Default value: `undef` ##### `period` -Data type: `Optional[String]` +Data type: `Optional[String[1]]` The name of a time period which determines when this notification should be triggered. @@ -4188,7 +4188,7 @@ Default value: `undef` ##### `zone` -Data type: `Optional[String]` +Data type: `Optional[String[1]]` The zone this object is a member of. @@ -4196,7 +4196,7 @@ Default value: `undef` ##### `types` -Data type: `Optional[Variant[Array, String]]` +Data type: `Optional[Variant[Array, String[1]]]` A list of type filters when this notification should be triggered. @@ -4204,7 +4204,7 @@ Default value: `undef` ##### `states` -Data type: `Optional[Variant[Array, String]]` +Data type: `Optional[Variant[Array, String[1]]]` A list of state filters when this notification should be triggered. @@ -4220,7 +4220,7 @@ Default value: `false` ##### `apply` -Data type: `Variant[Boolean, String]` +Data type: `Variant[Boolean, String[1]]` Dispose an apply instead an object if set to 'true'. Value is taken as statement, i.e. 'vhost => config in host.vars.vhosts'. @@ -4229,7 +4229,7 @@ Default value: `false` ##### `prefix` -Data type: `Variant[Boolean, String]` +Data type: `Variant[Boolean, String[1]]` Set notification_name as prefix in front of 'apply for'. Only effects if apply is a string. @@ -4245,7 +4245,7 @@ Default value: `'Host'` ##### `import` -Data type: `Array` +Data type: `Array[String[1]]` Sorted List of templates to include. @@ -4260,7 +4260,7 @@ first time. ##### `order` -Data type: `Variant[String, Integer]` +Data type: `Variant[String[1], Integer[0]]` String or integer to set the position in the target file, sorted alpha numeric. @@ -4268,7 +4268,7 @@ Default value: `85` ##### `assign` -Data type: `Array` +Data type: `Array[String[1]]` Assign notification using the assign rules. @@ -4276,7 +4276,7 @@ Default value: `[]` ##### `ignore` -Data type: `Array` +Data type: `Array[String[1]]` Exclude notification using the ignore rules. @@ -4284,7 +4284,7 @@ Default value: `[]` ##### `export` -Data type: `Variant[Array[String], String]` +Data type: `Variant[Array[String[1]], String[1]]` Export object to destination, collected by class `icinga2::query_objects`. @@ -4321,7 +4321,7 @@ Default value: `present` ##### `notificationcommand_name` -Data type: `String` +Data type: `String[1]` Set the Icinga 2 name of the notificationcommand object. @@ -4329,7 +4329,7 @@ Default value: `$title` ##### `command` -Data type: `Optional[Variant[Array, String]]` +Data type: `Optional[Variant[Array, String[1]]]` The command. This can either be an array of individual command arguments. Alternatively a string can be specified in which case the shell interpreter @@ -4339,7 +4339,7 @@ Default value: `undef` ##### `env` -Data type: `Optional[Hash]` +Data type: `Optional[Hash[String[1], Any]]` A dictionary of macros which should be exported as environment variables prior to executing the command. @@ -4366,7 +4366,7 @@ Default value: `undef` ##### `arguments` -Data type: `Optional[Hash]` +Data type: `Optional[Variant[Hash, String]]` A dictionary of command arguments. @@ -4382,7 +4382,7 @@ Default value: `false` ##### `import` -Data type: `Array` +Data type: `Array[String[1]]` Sorted List of templates to include. @@ -4397,7 +4397,7 @@ first time. ##### `order` -Data type: `Variant[String, Integer]` +Data type: `Variant[String[1], Integer[0]]` String or integer to set the position in the target file, sorted alpha numeric. @@ -4405,7 +4405,7 @@ Default value: `25` ##### `export` -Data type: `Variant[Array[String], String]` +Data type: `Variant[Array[String[1]], String[1]]` Export object to destination, collected by class `icinga2::query_objects`. @@ -4447,7 +4447,7 @@ Default value: `present` ##### `scheduleddowntime_name` -Data type: `String` +Data type: `String[1]` Set the Icinga 2 name of the scheduleddowntime object. @@ -4455,7 +4455,7 @@ Default value: `$title` ##### `host_name` -Data type: `Optional[String]` +Data type: `Optional[String[1]]` The name of the host this comment belongs to. @@ -4463,7 +4463,7 @@ Default value: `undef` ##### `service_name` -Data type: `Optional[String]` +Data type: `Optional[String[1]]` The short name of the service this comment belongs to. If omitted, this comment object is treated as host comment. @@ -4471,7 +4471,7 @@ Default value: `undef` ##### `author` -Data type: `Optional[String]` +Data type: `Optional[String[1]]` The author's name. @@ -4479,7 +4479,7 @@ Default value: `undef` ##### `comment` -Data type: `Optional[String]` +Data type: `Optional[String[1]]` The comment text. @@ -4511,7 +4511,7 @@ Default value: `undef` ##### `apply` -Data type: `Variant[Boolean, String]` +Data type: `Variant[Boolean, String[1]]` Dispose an apply instead an object if set to 'true'. Value is taken as statement, i.e. 'vhost => config in host.vars.vhosts'. @@ -4520,7 +4520,7 @@ Default value: `false` ##### `prefix` -Data type: `Variant[Boolean, String]` +Data type: `Variant[Boolean, String[1]]` Set scheduleddowntime_name as prefix in front of 'apply for'. Only effects if apply is a string. @@ -4536,7 +4536,7 @@ Default value: `'Host'` ##### `assign` -Data type: `Array` +Data type: `Array[String[1]]` Assign user group members using the group assign rules. @@ -4544,7 +4544,7 @@ Default value: `[]` ##### `ignore` -Data type: `Array` +Data type: `Array[String[1]]` Exclude users using the group ignore rules. @@ -4559,7 +4559,7 @@ first time. ##### `order` -Data type: `Variant[String, Integer]` +Data type: `Variant[String[1], Integer[1]]` String or integer to set the position in the target file, sorted alpha numeric. @@ -4567,7 +4567,7 @@ Default value: `90` ##### `export` -Data type: `Variant[Array[String], String]` +Data type: `Variant[Array[String[1]], String[1]]` Export object to destination, collected by class `icinga2::query_objects`. @@ -4659,7 +4659,7 @@ Default value: `present` ##### `service_name` -Data type: `String` +Data type: `String[1]` Set the Icinga 2 name of the service object. @@ -4667,7 +4667,7 @@ Default value: `$title` ##### `display_name` -Data type: `Optional[String]` +Data type: `Optional[String[1]]` A short description of the service. @@ -4675,7 +4675,7 @@ Default value: `undef` ##### `host_name` -Data type: `Optional[String]` +Data type: `Optional[String[1]]` The host this service belongs to. There must be a Host object with that name. @@ -4684,7 +4684,7 @@ Default value: `undef` ##### `groups` -Data type: `Optional[Array]` +Data type: `Optional[Array[String[1]]]` The service groups this service belongs to. @@ -4702,7 +4702,7 @@ Default value: `undef` ##### `check_command` -Data type: `Optional[String]` +Data type: `Optional[String[1]]` The name of the check command. @@ -4719,7 +4719,7 @@ Default value: `undef` ##### `check_period` -Data type: `Optional[String]` +Data type: `Optional[String[1]]` The name of a time period which determines when this service should be checked. @@ -4803,7 +4803,7 @@ Default value: `undef` ##### `event_command` -Data type: `Optional[String]` +Data type: `Optional[String[1]]` The name of an event command that should be executed every time the service's state changes or the service is in a SOFT state. @@ -4837,7 +4837,7 @@ Default value: `undef` ##### `zone` -Data type: `Optional[String]` +Data type: `Optional[String[1]]` The zone this object is a member of. @@ -4845,7 +4845,7 @@ Default value: `undef` ##### `command_endpoint` -Data type: `Optional[String]` +Data type: `Optional[String[1]]` The endpoint where commands are executed on. @@ -4853,7 +4853,7 @@ Default value: `undef` ##### `notes` -Data type: `Optional[String]` +Data type: `Optional[String[1]]` Notes for the service. @@ -4861,7 +4861,7 @@ Default value: `undef` ##### `notes_url` -Data type: `Optional[String]` +Data type: `Optional[String[1]]` Url for notes for the service (for example, in notification commands). @@ -4869,7 +4869,7 @@ Default value: `undef` ##### `action_url` -Data type: `Optional[String]` +Data type: `Optional[String[1]]` Url for actions for the service (for example, an external graphing tool). @@ -4877,7 +4877,7 @@ Default value: `undef` ##### `icon_image` -Data type: `Optional[String]` +Data type: `Optional[String[1]]` Icon image for the service. Used by external interfaces only. @@ -4885,7 +4885,7 @@ Default value: `undef` ##### `icon_image_alt` -Data type: `Optional[String]` +Data type: `Optional[String[1]]` Icon image description for the service. Used by external interface only. @@ -4901,7 +4901,7 @@ Default value: `false` ##### `apply` -Data type: `Variant[Boolean, String]` +Data type: `Variant[Boolean, String[1]]` Dispose an apply instead an object if set to 'true'. Value is taken as statement, i.e. 'vhost => config in host.vars.vhosts'. @@ -4910,7 +4910,7 @@ Default value: `false` ##### `prefix` -Data type: `Variant[Boolean, String]` +Data type: `Variant[Boolean, String[1]]` Set service_name as prefix in front of 'apply for'. Only effects if apply is a string. @@ -4918,7 +4918,7 @@ Default value: `false` ##### `assign` -Data type: `Array` +Data type: `Array[String[1]]` Assign service using the assign rules. @@ -4926,7 +4926,7 @@ Default value: `[]` ##### `ignore` -Data type: `Array` +Data type: `Array[String[1]]` Exclude service using the ignore rules. @@ -4934,7 +4934,7 @@ Default value: `[]` ##### `import` -Data type: `Array` +Data type: `Array[String[1]]` Sorted List of templates to include. @@ -4949,7 +4949,7 @@ first time. ##### `order` -Data type: `Variant[String, Integer]` +Data type: `Variant[String[1], Integer[0]]` String or integer to set the position in the target file, sorted alpha numeric. @@ -4957,7 +4957,7 @@ Default value: `60` ##### `export` -Data type: `Variant[Array[String], String]` +Data type: `Variant[Array[String[1]], String[1]]` Export object to destination, collected by class `icinga2::query_objects`. @@ -4993,7 +4993,7 @@ Default value: `present` ##### `servicegroup_name` -Data type: `String` +Data type: `String[1]` Set the Icinga 2 name of the servicegroup object. @@ -5001,7 +5001,7 @@ Default value: `$title` ##### `display_name` -Data type: `Optional[String]` +Data type: `Optional[String[1]]` A short description of the service group. @@ -5017,7 +5017,7 @@ Default value: `undef` ##### `assign` -Data type: `Array` +Data type: `Array[String[1]]` Assign user group members using the group assign rules. @@ -5025,7 +5025,7 @@ Default value: `[]` ##### `ignore` -Data type: `Array` +Data type: `Array[String[1]]` Exclude users using the group ignore rules. @@ -5041,7 +5041,7 @@ Default value: `false` ##### `import` -Data type: `Array` +Data type: `Array[String[1]]` Sorted List of templates to include. @@ -5056,7 +5056,7 @@ first time. ##### `order` -Data type: `Variant[String, Integer]` +Data type: `Variant[String[1], Integer[0]]` String or integer to set the position in the target file, sorted alpha numeric. @@ -5064,7 +5064,7 @@ Default value: `65` ##### `export` -Data type: `Variant[Array[String], String]` +Data type: `Variant[Array[String[1]], String[1]]` Export object to destination, collected by class `icinga2::query_objects`. @@ -5101,7 +5101,7 @@ Default value: `present` ##### `timeperiod_name` -Data type: `String` +Data type: `String[1]` Set the Icinga 2 name of the timeperiod object. @@ -5109,7 +5109,7 @@ Default value: `$title` ##### `display_name` -Data type: `Optional[String]` +Data type: `Optional[String[1]]` A short description of the time period. @@ -5117,7 +5117,7 @@ Default value: `undef` ##### `import` -Data type: `Array` +Data type: `Array[String[1]]` Sorted List of templates to include. @@ -5142,7 +5142,7 @@ Default value: `undef` ##### `excludes` -Data type: `Optional[Array]` +Data type: `Optional[Array[String[1]]]` An array of timeperiods, which should exclude from your timerange. @@ -5150,7 +5150,7 @@ Default value: `undef` ##### `includes` -Data type: `Optional[Array]` +Data type: `Optional[Array[String[1]]]` An array of timeperiods, which should include into your timerange @@ -5172,7 +5172,7 @@ Destination config file to store this object in. File will be declared on the fi ##### `order` -Data type: `Variant[String, Integer]` +Data type: `Variant[String[1], Integer[0]]` String or integer to control the position in the target file, sorted alpha numeric. @@ -5180,7 +5180,7 @@ Default value: `35` ##### `export` -Data type: `Variant[Array[String], String]` +Data type: `Variant[Array[String[1]], String[1]]` Export object to destination, collected by class `icinga2::query_objects`. @@ -5221,7 +5221,7 @@ Default value: `present` ##### `user_name` -Data type: `String` +Data type: `String[1]` Set the Icinga 2 name of the user object. @@ -5229,7 +5229,7 @@ Default value: `$title` ##### `display_name` -Data type: `Optional[String]` +Data type: `Optional[String[1]]` A short description of the user. @@ -5237,7 +5237,7 @@ Default value: `undef` ##### `email` -Data type: `Optional[String]` +Data type: `Optional[String[1]]` An email string for this user. Useful for notification commands. @@ -5245,7 +5245,7 @@ Default value: `undef` ##### `pager` -Data type: `Optional[String]` +Data type: `Optional[String[1]]` A pager string for this user. Useful for notification commands. @@ -5263,7 +5263,7 @@ Default value: `undef` ##### `groups` -Data type: `Optional[Array]` +Data type: `Optional[Array[String[1]]]` An array of group names. @@ -5279,7 +5279,7 @@ Default value: `undef` ##### `period` -Data type: `Optional[String]` +Data type: `Optional[String[1]]` The name of a time period which determines when a notification for this user should be triggered. @@ -5288,7 +5288,7 @@ Default value: `undef` ##### `types` -Data type: `Optional[Array]` +Data type: `Optional[Array[String[1]]]` A set of type filters when this notification should be triggered. everything is matched. @@ -5297,7 +5297,7 @@ Default value: `undef` ##### `states` -Data type: `Optional[Array]` +Data type: `Optional[Array[String[1]]]` A set of state filters when this notification should be triggered. @@ -5313,7 +5313,7 @@ Default value: `false` ##### `import` -Data type: `Array` +Data type: `Array[String[1]]` Sorted List of templates to include. @@ -5328,7 +5328,7 @@ first time. ##### `order` -Data type: `Variant[String, Integer]` +Data type: `Variant[String[1], Integer[1]]` String or integer to set the position in the target file, sorted alpha numeric. @@ -5336,7 +5336,7 @@ Default value: `75` ##### `export` -Data type: `Variant[Array[String], String]` +Data type: `Variant[Array[String[1]], String[1]]` Export object to destination, collected by class `icinga2::query_objects`. @@ -5372,7 +5372,7 @@ Default value: `present` ##### `usergroup_name` -Data type: `String` +Data type: `String[1]` Set the Icinga 2 name of the usergroup object. @@ -5380,7 +5380,7 @@ Default value: `$title` ##### `display_name` -Data type: `Optional[String]` +Data type: `Optional[String[1]]` A short description of the service group. @@ -5388,7 +5388,7 @@ Default value: `undef` ##### `groups` -Data type: `Array` +Data type: `Array[String[1]]` An array of nested group names. @@ -5396,7 +5396,7 @@ Default value: `[]` ##### `assign` -Data type: `Array` +Data type: `Array[String[1]]` Assign user group members using the group assign rules. @@ -5404,7 +5404,7 @@ Default value: `[]` ##### `ignore` -Data type: `Array` +Data type: `Array[String[1]]` Exclude users using the group ignore rules. @@ -5420,7 +5420,7 @@ Default value: `false` ##### `import` -Data type: `Array` +Data type: `Array[String[1]]` Sorted List of templates to include. @@ -5435,7 +5435,7 @@ first time. ##### `order` -Data type: `Variant[String, Integer]` +Data type: `Variant[String[1], Integer[0]]` String or integer to set the position in the target file, sorted alpha numeric. @@ -5443,7 +5443,7 @@ Default value: `80` ##### `export` -Data type: `Variant[Array[String], String]` +Data type: `Variant[Array[String[1]], String[1]]` Export object to destination, collected by class `icinga2::query_objects`. @@ -5476,7 +5476,7 @@ Default value: `present` ##### `zone_name` -Data type: `String` +Data type: `String[1]` Set the Icinga 2 name of the zone object. @@ -5484,7 +5484,7 @@ Default value: `$title` ##### `endpoints` -Data type: `Array` +Data type: `Array[String[1]]` List of endpoints belong to this zone. @@ -5492,7 +5492,7 @@ Default value: `[]` ##### `parent` -Data type: `Optional[String]` +Data type: `Optional[String[1]]` Parent zone to this zone. @@ -5518,7 +5518,7 @@ Default value: `undef` ##### `order` -Data type: `Variant[String, Integer]` +Data type: `Variant[String[1], Integer[0]]` String or integer to control the position in the target file, sorted alpha numeric. @@ -5526,7 +5526,7 @@ Default value: `45` ##### `export` -Data type: `Variant[Array[String], String]` +Data type: `Variant[Array[String[1]], String[1]]` Export object to destination, collected by class `icinga2::query_objects`. @@ -5696,8 +5696,8 @@ Alias of ```puppet Struct[{ - 'username' => String, - 'password' => Variant[String, Sensitive[String]], + 'username' => String[1], + 'password' => Variant[String[1], Sensitive[String[1]]], }] ``` @@ -5738,14 +5738,14 @@ Hash[Enum[ 'statehistory_age', 'servicechecks_age', 'systemcommands_age', - ], String] + ], String[1]] ``` ### `Icinga2::Interval` A strict type for intervals -Alias of `Variant[Integer, Pattern[/\A\d+\.?\d*[d|h|m|s]?\Z/, /\A\$.+\$\Z/, /\A(host|service)\..+/]]` +Alias of `Variant[Integer[0], Pattern[/\A\d+\.?\d*[d|h|m|s]?\Z/, /\A\$.+\$\Z/, /\A(host|service)\..+/]]` ### `Icinga2::LogFacility` diff --git a/manifests/feature.pp b/manifests/feature.pp index 822d307a..13e072ae 100644 --- a/manifests/feature.pp +++ b/manifests/feature.pp @@ -5,7 +5,7 @@ # define icinga2::feature ( Enum['absent', 'present'] $ensure = present, - String $feature = $title, + String[1] $feature = $title, ) { assert_private() diff --git a/manifests/feature/api.pp b/manifests/feature/api.pp index d9da29e4..042647e2 100644 --- a/manifests/feature/api.pp +++ b/manifests/feature/api.pp @@ -160,23 +160,23 @@ Stdlib::Port $ca_port = 5665, Icinga::Secret $ticket_salt = 'TicketSalt', Optional[Icinga::Secret] $ticket_id = undef, - Hash[String, Hash] $endpoints = { 'NodeName' => {} }, - Hash[String, Hash] $zones = { 'ZoneName' => { endpoints => ['NodeName'] } }, + Hash[String[1], Hash] $endpoints = { 'NodeName' => {} }, + Hash[String[1], Hash] $zones = { 'ZoneName' => { endpoints => ['NodeName'] } }, Optional[Icinga::Secret] $ssl_key = undef, - Optional[String] $ssl_cert = undef, - Optional[String] $ssl_cacert = undef, + Optional[String[1]] $ssl_cert = undef, + Optional[String[1]] $ssl_cacert = undef, Optional[Enum['TLSv1', 'TLSv1.1', 'TLSv1.2', 'TLSv1.3']] $ssl_protocolmin = undef, Optional[Icinga2::Interval] $ssl_handshake_timeout = undef, Optional[Icinga2::Interval] $connect_timeout = undef, - Optional[String] $ssl_cipher_list = undef, + Optional[String[1]] $ssl_cipher_list = undef, Optional[Stdlib::Host] $bind_host = undef, Optional[Stdlib::Port] $bind_port = undef, Optional[Array[Enum['GET', 'POST', 'PUT', 'DELETE']]] $access_control_allow_methods = undef, - Optional[Array[String]] $access_control_allow_origin = undef, + Optional[Array[String[1]]] $access_control_allow_origin = undef, Optional[Boolean] $access_control_allow_credentials = undef, - Optional[String] $access_control_allow_headers = undef, + Optional[String[1]] $access_control_allow_headers = undef, Optional[Icinga2::Fingerprint] $fingerprint = undef, - Optional[String] $environment = undef, + Optional[String[1]] $environment = undef, ) { if ! defined(Class['icinga2']) { fail('You must include the icinga2 base class before using any icinga2 feature class!') diff --git a/manifests/feature/elasticsearch.pp b/manifests/feature/elasticsearch.pp index 1880424d..d07ebd62 100644 --- a/manifests/feature/elasticsearch.pp +++ b/manifests/feature/elasticsearch.pp @@ -65,8 +65,8 @@ Enum['absent', 'present'] $ensure = present, Optional[Stdlib::Host] $host = undef, Optional[Stdlib::Port] $port = undef, - Optional[String] $index = undef, - Optional[String] $username = undef, + Optional[String[1]] $index = undef, + Optional[String[1]] $username = undef, Optional[Icinga::Secret] $password = undef, Optional[Boolean] $enable_ssl = undef, Optional[Boolean] $ssl_noverify = undef, @@ -74,11 +74,11 @@ Optional[Stdlib::Absolutepath] $ssl_cert_path = undef, Optional[Stdlib::Absolutepath] $ssl_cacert_path = undef, Optional[Icinga::Secret] $ssl_key = undef, - Optional[String] $ssl_cert = undef, - Optional[String] $ssl_cacert = undef, + Optional[String[1]] $ssl_cert = undef, + Optional[String[1]] $ssl_cacert = undef, Optional[Boolean] $enable_send_perfdata = undef, Optional[Icinga2::Interval] $flush_interval = undef, - Optional[Integer] $flush_threshold = undef, + Optional[Integer[0]] $flush_threshold = undef, Optional[Boolean] $enable_ha = undef, ) { if ! defined(Class['icinga2']) { diff --git a/manifests/feature/gelf.pp b/manifests/feature/gelf.pp index 5d0e2073..920a4b5a 100644 --- a/manifests/feature/gelf.pp +++ b/manifests/feature/gelf.pp @@ -47,14 +47,14 @@ Enum['absent', 'present'] $ensure = present, Optional[Stdlib::Host] $host = undef, Optional[Stdlib::Port] $port = undef, - Optional[String] $source = undef, + Optional[String[1]] $source = undef, Boolean $enable_ssl = false, Optional[Stdlib::Absolutepath] $ssl_key_path = undef, Optional[Stdlib::Absolutepath] $ssl_cert_path = undef, Optional[Stdlib::Absolutepath] $ssl_cacert_path = undef, Optional[Icinga::Secret] $ssl_key = undef, - Optional[String] $ssl_cert = undef, - Optional[String] $ssl_cacert = undef, + Optional[String[1]] $ssl_cert = undef, + Optional[String[1]] $ssl_cacert = undef, Optional[Boolean] $ssl_noverify = undef, Optional[Boolean] $enable_send_perfdata = undef, Optional[Boolean] $enable_ha = undef, diff --git a/manifests/feature/graphite.pp b/manifests/feature/graphite.pp index 34709c6b..49c466be 100644 --- a/manifests/feature/graphite.pp +++ b/manifests/feature/graphite.pp @@ -35,8 +35,8 @@ Enum['absent', 'present'] $ensure = present, Optional[Stdlib::Host] $host = undef, Optional[Stdlib::Port] $port = undef, - Optional[String] $host_name_template = undef, - Optional[String] $service_name_template = undef, + Optional[String[1]] $host_name_template = undef, + Optional[String[1]] $service_name_template = undef, Optional[Boolean] $enable_send_thresholds = undef, Optional[Boolean] $enable_send_metadata = undef, Optional[Boolean] $enable_ha = undef, diff --git a/manifests/feature/icingadb.pp b/manifests/feature/icingadb.pp index 109b9843..2e328013 100644 --- a/manifests/feature/icingadb.pp +++ b/manifests/feature/icingadb.pp @@ -78,11 +78,11 @@ Optional[Stdlib::Absolutepath] $tls_cacert_file = undef, Optional[Stdlib::Absolutepath] $tls_crl_file = undef, Optional[Icinga::Secret] $tls_key = undef, - Optional[String] $tls_cert = undef, - Optional[String] $tls_cacert = undef, - Optional[String] $tls_capath = undef, - Optional[String] $tls_cipher = undef, - Optional[String] $tls_protocolmin = undef, + Optional[String[1]] $tls_cert = undef, + Optional[String[1]] $tls_cacert = undef, + Optional[String[1]] $tls_capath = undef, + Optional[String[1]] $tls_cipher = undef, + Optional[String[1]] $tls_protocolmin = undef, Optional[Boolean] $tls_noverify = undef, ) { if ! defined(Class['icinga2']) { diff --git a/manifests/feature/idomysql.pp b/manifests/feature/idomysql.pp index e1246a14..a11e3088 100644 --- a/manifests/feature/idomysql.pp +++ b/manifests/feature/idomysql.pp @@ -98,21 +98,21 @@ Stdlib::Host $host = 'localhost', Optional[Stdlib::Port] $port = undef, Optional[Stdlib::Absolutepath] $socket_path = undef, - String $user = 'icinga', - String $database = 'icinga', + String[1] $user = 'icinga', + String[1] $database = 'icinga', Optional[Icinga::Secret] $password = undef, Boolean $enable_ssl = false, Optional[Stdlib::Absolutepath] $ssl_key_path = undef, Optional[Stdlib::Absolutepath] $ssl_cert_path = undef, Optional[Stdlib::Absolutepath] $ssl_cacert_path = undef, Optional[Icinga::Secret] $ssl_key = undef, - Optional[String] $ssl_cert = undef, - Optional[String] $ssl_cacert = undef, + Optional[String[1]] $ssl_cert = undef, + Optional[String[1]] $ssl_cacert = undef, Optional[Stdlib::Absolutepath] $ssl_capath = undef, - Optional[String] $ssl_cipher = undef, - Optional[String] $table_prefix = undef, - Optional[String] $instance_name = undef, - Optional[String] $instance_description = undef, + Optional[String[1]] $ssl_cipher = undef, + Optional[String[1]] $table_prefix = undef, + Optional[String[1]] $instance_name = undef, + Optional[String[1]] $instance_description = undef, Optional[Boolean] $enable_ha = undef, Optional[Icinga2::Interval] $failover_timeout = undef, Optional[Icinga2::IdoCleanup] $cleanup = undef, diff --git a/manifests/feature/idopgsql.pp b/manifests/feature/idopgsql.pp index 541b1ae7..09495999 100644 --- a/manifests/feature/idopgsql.pp +++ b/manifests/feature/idopgsql.pp @@ -85,8 +85,8 @@ Enum['absent', 'present'] $ensure = present, Stdlib::Host $host = 'localhost', Optional[Stdlib::Port] $port = undef, - String $user = 'icinga', - String $database = 'icinga', + String[1] $user = 'icinga', + String[1] $database = 'icinga', Optional[Icinga::Secret] $password = undef, Optional[Enum['disable', 'allow', 'prefer', 'verify-full', 'verify-ca', 'require']] $ssl_mode = undef, @@ -94,11 +94,11 @@ Optional[Stdlib::Absolutepath] $ssl_cert_path = undef, Optional[Stdlib::Absolutepath] $ssl_cacert_path = undef, Optional[Icinga::Secret] $ssl_key = undef, - Optional[String] $ssl_cert = undef, - Optional[String] $ssl_cacert = undef, - Optional[String] $table_prefix = undef, - Optional[String] $instance_name = undef, - Optional[String] $instance_description = undef, + Optional[String[1]] $ssl_cert = undef, + Optional[String[1]] $ssl_cacert = undef, + Optional[String[1]] $table_prefix = undef, + Optional[String[1]] $instance_name = undef, + Optional[String[1]] $instance_description = undef, Optional[Boolean] $enable_ha = undef, Optional[Icinga2::Interval] $failover_timeout = undef, Optional[Icinga2::IdoCleanup] $cleanup = undef, diff --git a/manifests/feature/influxdb.pp b/manifests/feature/influxdb.pp index a95c9e76..2aef916b 100644 --- a/manifests/feature/influxdb.pp +++ b/manifests/feature/influxdb.pp @@ -85,8 +85,8 @@ Enum['absent', 'present'] $ensure = present, Optional[Stdlib::Host] $host = undef, Optional[Stdlib::Port] $port = undef, - Optional[String] $database = undef, - Optional[String] $username = undef, + Optional[String[1]] $database = undef, + Optional[String[1]] $username = undef, Optional[Icinga::Secret] $password = undef, Optional[Icinga2::BasicAuth] $basic_auth = undef, Optional[Boolean] $enable_ssl = undef, @@ -95,12 +95,12 @@ Optional[Stdlib::Absolutepath] $ssl_cert_path = undef, Optional[Stdlib::Absolutepath] $ssl_cacert_path = undef, Optional[Icinga::Secret] $ssl_key = undef, - Optional[String] $ssl_cert = undef, - Optional[String] $ssl_cacert = undef, - String $host_measurement = '$host.check_command$', - Hash $host_tags = { hostname => '$host.name$' }, - String $service_measurement = '$service.check_command$', - Hash $service_tags = { hostname => '$host.name$', service => '$service.name$' }, + Optional[String[1]] $ssl_cert = undef, + Optional[String[1]] $ssl_cacert = undef, + String[1] $host_measurement = '$host.check_command$', + Hash[String[1], String[1]] $host_tags = { hostname => '$host.name$' }, + String[1] $service_measurement = '$service.check_command$', + Hash[String[1], String[1]] $service_tags = { hostname => '$host.name$', service => '$service.name$' }, Optional[Boolean] $enable_send_thresholds = undef, Optional[Boolean] $enable_send_metadata = undef, Optional[Icinga2::Interval] $flush_interval = undef, diff --git a/manifests/feature/influxdb2.pp b/manifests/feature/influxdb2.pp index ba8ab890..3bc72dc9 100644 --- a/manifests/feature/influxdb2.pp +++ b/manifests/feature/influxdb2.pp @@ -79,8 +79,8 @@ # Enable the high availability functionality. Only valid in a cluster setup. # class icinga2::feature::influxdb2 ( - String $organization, - String $bucket, + String[1] $organization, + String[1] $bucket, Icinga::Secret $auth_token, Enum['absent', 'present'] $ensure = present, Optional[Stdlib::Host] $host = undef, @@ -91,12 +91,12 @@ Optional[Stdlib::Absolutepath] $ssl_cert_path = undef, Optional[Stdlib::Absolutepath] $ssl_cacert_path = undef, Optional[Icinga::Secret] $ssl_key = undef, - Optional[String] $ssl_cert = undef, - Optional[String] $ssl_cacert = undef, - String $host_measurement = '$host.check_command$', - Hash $host_tags = { hostname => '$host.name$' }, - String $service_measurement = '$service.check_command$', - Hash $service_tags = { hostname => '$host.name$', service => '$service.name$' }, + Optional[String[1]] $ssl_cert = undef, + Optional[String[1]] $ssl_cacert = undef, + String[1] $host_measurement = '$host.check_command$', + Hash[String[1], String[1]] $host_tags = { hostname => '$host.name$' }, + String[1] $service_measurement = '$service.check_command$', + Hash[String[1], String[1]] $service_tags = { hostname => '$host.name$', service => '$service.name$' }, Optional[Boolean] $enable_send_thresholds = undef, Optional[Boolean] $enable_send_metadata = undef, Optional[Icinga2::Interval] $flush_interval = undef, diff --git a/manifests/feature/perfdata.pp b/manifests/feature/perfdata.pp index 453b1080..b93ca996 100644 --- a/manifests/feature/perfdata.pp +++ b/manifests/feature/perfdata.pp @@ -35,8 +35,8 @@ Optional[Stdlib::Absolutepath] $service_perfdata_path = undef, Optional[Stdlib::Absolutepath] $host_temp_path = undef, Optional[Stdlib::Absolutepath] $service_temp_path = undef, - Optional[String] $host_format_template = undef, - Optional[String] $service_format_template = undef, + Optional[String[1]] $host_format_template = undef, + Optional[String[1]] $service_format_template = undef, Optional[Icinga2::Interval] $rotation_interval = undef, Optional[Boolean] $enable_ha = undef, ) { diff --git a/manifests/globals.pp b/manifests/globals.pp index 61ba19aa..744b9f09 100644 --- a/manifests/globals.pp +++ b/manifests/globals.pp @@ -74,10 +74,10 @@ # How to do a reload of the Icinga process. # class icinga2::globals ( - String $package_name, - String $service_name, - String $ido_mysql_schema, - String $ido_pgsql_schema, + String[1] $package_name, + String[1] $service_name, + String[1] $ido_mysql_schema, + String[1] $ido_pgsql_schema, Stdlib::Absolutepath $icinga2_bin, Stdlib::Absolutepath $conf_dir, Stdlib::Absolutepath $lib_dir, @@ -88,14 +88,14 @@ Stdlib::Absolutepath $data_dir, Stdlib::Absolutepath $cert_dir, Stdlib::Absolutepath $ca_dir, - Array[String] $reserved, - Optional[String] $user = undef, - Optional[String] $group = undef, - Optional[String] $logon_account = undef, - Optional[String] $selinux_package_name = undef, - Optional[String] $ido_mysql_package_name = undef, - Optional[String] $ido_pgsql_package_name = undef, - Optional[String] $service_reload = undef, + Array[String[1]] $reserved, + Optional[String[1]] $user = undef, + Optional[String[1]] $group = undef, + Optional[String[1]] $logon_account = undef, + Optional[String[1]] $selinux_package_name = undef, + Optional[String[1]] $ido_mysql_package_name = undef, + Optional[String[1]] $ido_pgsql_package_name = undef, + Optional[String[1]] $service_reload = undef, ) { assert_private() diff --git a/manifests/init.pp b/manifests/init.pp index 0d17c9a3..6821e052 100644 --- a/manifests/init.pp +++ b/manifests/init.pp @@ -112,17 +112,17 @@ # with tag icinga2::config::file. # class icinga2 ( - Array $features, - Array $plugins, - Stdlib::Ensure::Service $ensure = running, - Boolean $enable = true, - Boolean $manage_repos = false, - Boolean $manage_packages = true, - Boolean $manage_selinux = false, - Boolean $manage_service = true, - Boolean $purge_features = true, - Hash $constants = {}, - Variant[Boolean, String] $confd = true, + Array[String[1]] $features, + Array[String[1]] $plugins, + Stdlib::Ensure::Service $ensure = running, + Boolean $enable = true, + Boolean $manage_repos = false, + Boolean $manage_packages = true, + Boolean $manage_selinux = false, + Boolean $manage_service = true, + Boolean $purge_features = true, + Hash[String[1], Any] $constants = {}, + Variant[Boolean, String[1]] $confd = true, ) { require icinga2::globals diff --git a/manifests/object.pp b/manifests/object.pp index 41208867..b5d525e8 100644 --- a/manifests/object.pp +++ b/manifests/object.pp @@ -50,20 +50,20 @@ # Array of all possible attributes for this object type. # define icinga2::object ( - String $object_type, + String[1] $object_type, Stdlib::Absolutepath $target, - Variant[String, Integer] $order, + Variant[String[1], Integer[0]] $order, Enum['present', 'absent'] $ensure = present, - String $object_name = $title, + String[1] $object_name = $title, Boolean $template = false, Variant[Boolean, Pattern[/^.+\s+(=>\s+.+\s+)?in\s+.+$/]] $apply = false, - Array $attrs_list = [], + Array[String[1]] $attrs_list = [], Optional[Enum['Host', 'Service']] $apply_target = undef, - Variant[Boolean, String] $prefix = false, - Array $import = [], - Array $assign = [], - Array $ignore = [], - Hash $attrs = {}, + Variant[Boolean, String[1]] $prefix = false, + Array[String[1]] $import = [], + Array[String[1]] $assign = [], + Array[String[1]] $ignore = [], + Hash[String[1], Any] $attrs = {}, ) { assert_private() diff --git a/manifests/object/apiuser.pp b/manifests/object/apiuser.pp index 59987e79..477a39fe 100644 --- a/manifests/object/apiuser.pp +++ b/manifests/object/apiuser.pp @@ -54,21 +54,21 @@ # Destination config file to store in this object. File will be declared at the # first time. # -# @param [Variant[String, Integer]] order +# @param order # String or integer to set the position in the target file, sorted alpha numeric. # # @param export # Export object to destination, collected by class `icinga2::query_objects`. # define icinga2::object::apiuser ( - Stdlib::Absolutepath $target, - Enum['absent', 'present'] $ensure = present, - String $apiuser_name = $title, - Optional[Array] $permissions = undef, - Optional[Icinga::Secret] $password = undef, - Optional[String] $client_cn = undef, - Variant[String, Integer] $order = 30, - Variant[Array[String], String] $export = [], + Stdlib::Absolutepath $target, + Enum['absent', 'present'] $ensure = present, + String[1] $apiuser_name = $title, + Optional[Array] $permissions = undef, + Optional[Icinga::Secret] $password = undef, + Optional[String[1]] $client_cn = undef, + Variant[String[1], Integer[0]] $order = 30, + Variant[Array[String[1]], String[1]] $export = [], ) { require icinga2::globals diff --git a/manifests/object/checkcommand.pp b/manifests/object/checkcommand.pp index d2bc4f60..7f1260bd 100644 --- a/manifests/object/checkcommand.pp +++ b/manifests/object/checkcommand.pp @@ -43,18 +43,18 @@ # Export object to destination, collected by class `icinga2::query_objects`. # define icinga2::object::checkcommand ( - Stdlib::Absolutepath $target, - Enum['absent', 'present'] $ensure = present, - String $checkcommand_name = $title, - Array $import = [], - Optional[Variant[Array, String]] $command = undef, - Optional[Hash] $env = undef, - Optional[Icinga2::CustomAttributes] $vars = undef, - Optional[Icinga2::Interval] $timeout = undef, - Optional[Variant[Hash, String]] $arguments = undef, - Boolean $template = false, - Variant[String, Integer] $order = 15, - Variant[Array[String], String] $export = [], + Stdlib::Absolutepath $target, + Enum['absent', 'present'] $ensure = present, + String[1] $checkcommand_name = $title, + Array[String[1]] $import = [], + Optional[Variant[Array, String[1]]] $command = undef, + Optional[Hash[String[1], Any]] $env = undef, + Optional[Icinga2::CustomAttributes] $vars = undef, + Optional[Icinga2::Interval] $timeout = undef, + Optional[Variant[Hash, String]] $arguments = undef, + Boolean $template = false, + Variant[String[1], Integer[0]] $order = 15, + Variant[Array[String[1]], String[1]] $export = [], ) { require icinga2::globals diff --git a/manifests/object/checkresultreader.pp b/manifests/object/checkresultreader.pp index c6e37e13..0e7f18e8 100644 --- a/manifests/object/checkresultreader.pp +++ b/manifests/object/checkresultreader.pp @@ -20,9 +20,9 @@ define icinga2::object::checkresultreader ( Stdlib::Absolutepath $target, Enum['absent', 'present'] $ensure = present, - String $checkresultreader_name = $title, + String[1] $checkresultreader_name = $title, Optional[Stdlib::Absolutepath] $spool_dir = undef, - Variant[String, Integer] $order = '05', + Variant[String[1], Integer[0]] $order = '05', ) { require icinga2::globals diff --git a/manifests/object/dependency.pp b/manifests/object/dependency.pp index fcdaf2d7..8f5a112a 100644 --- a/manifests/object/dependency.pp +++ b/manifests/object/dependency.pp @@ -72,27 +72,27 @@ # Export object to destination, collected by class `icinga2::query_objects`. # define icinga2::object::dependency ( - Stdlib::Absolutepath $target, - Enum['absent', 'present'] $ensure = present, - String $dependency_name = $title, - Optional[String] $parent_host_name = undef, - Optional[String] $parent_service_name = undef, - Optional[String] $child_host_name = undef, - Optional[String] $child_service_name = undef, - Optional[Boolean] $disable_checks = undef, - Optional[Boolean] $disable_notifications = undef, - Optional[Boolean] $ignore_soft_states = undef, - Optional[String] $period = undef, - Optional[Array] $states = undef, - Variant[Boolean, String] $apply = false, - Variant[Boolean, String] $prefix = false, - Enum['Host', 'Service'] $apply_target = 'Host', - Array $assign = [], - Array $ignore = [], - Array $import = [], - Boolean $template = false, - Variant[String, Integer] $order = 70, - Variant[Array[String], String] $export = [], + Stdlib::Absolutepath $target, + Enum['absent', 'present'] $ensure = present, + String[1] $dependency_name = $title, + Optional[String[1]] $parent_host_name = undef, + Optional[String[1]] $parent_service_name = undef, + Optional[String[1]] $child_host_name = undef, + Optional[String[1]] $child_service_name = undef, + Optional[Boolean] $disable_checks = undef, + Optional[Boolean] $disable_notifications = undef, + Optional[Boolean] $ignore_soft_states = undef, + Optional[String[1]] $period = undef, + Optional[Array] $states = undef, + Variant[Boolean, String[1]] $apply = false, + Variant[Boolean, String[1]] $prefix = false, + Enum['Host', 'Service'] $apply_target = 'Host', + Array[String[1]] $assign = [], + Array[String[1]] $ignore = [], + Array[String[1]] $import = [], + Boolean $template = false, + Variant[String[1], Integer[0]] $order = 70, + Variant[Array[String[1]], String[1]] $export = [], ) { require icinga2::globals diff --git a/manifests/object/endpoint.pp b/manifests/object/endpoint.pp index 9e28a1a6..9f872b47 100644 --- a/manifests/object/endpoint.pp +++ b/manifests/object/endpoint.pp @@ -31,13 +31,13 @@ # define icinga2::object::endpoint ( Enum['absent', 'present'] $ensure = present, - String $endpoint_name = $title, + String[1] $endpoint_name = $title, Optional[Stdlib::Host] $host = undef, Optional[Stdlib::Port] $port = undef, Optional[Icinga2::Interval] $log_duration = undef, Optional[Stdlib::Absolutepath] $target = undef, - Variant[String, Integer] $order = 40, - Variant[Array[String], String] $export = [], + Variant[String[1], Integer[0]] $order = 40, + Variant[Array[String[1]], String[1]] $export = [], ) { require icinga2::globals $conf_dir = $icinga2::globals::conf_dir diff --git a/manifests/object/eventcommand.pp b/manifests/object/eventcommand.pp index 6f307d68..77089a46 100644 --- a/manifests/object/eventcommand.pp +++ b/manifests/object/eventcommand.pp @@ -40,17 +40,17 @@ # Export object to destination, collected by class `icinga2::query_objects`. # define icinga2::object::eventcommand ( - Stdlib::Absolutepath $target, - Enum['absent', 'present'] $ensure = present, - String $eventcommand_name = $title, - Optional[Variant[Array, String]] $command = undef, - Optional[Hash] $env = undef, - Optional[Icinga2::CustomAttributes] $vars = undef, - Optional[Icinga2::Interval] $timeout = undef, - Optional[Hash] $arguments = undef, - Array $import = [], - Variant[String, Integer] $order = 20, - Variant[Array[String], String] $export = [], + Stdlib::Absolutepath $target, + Enum['absent', 'present'] $ensure = present, + String[1] $eventcommand_name = $title, + Optional[Variant[Array, String]] $command = undef, + Optional[Hash] $env = undef, + Optional[Icinga2::CustomAttributes] $vars = undef, + Optional[Icinga2::Interval] $timeout = undef, + Optional[Variant[Hash, String]] $arguments = undef, + Array[String[1]] $import = [], + Variant[String[1], Integer[0]] $order = 20, + Variant[Array[String[1]], String[1]] $export = [], ) { require icinga2::globals diff --git a/manifests/object/host.pp b/manifests/object/host.pp index 98c60c93..dba810ea 100644 --- a/manifests/object/host.pp +++ b/manifests/object/host.pp @@ -111,41 +111,41 @@ # Export object to destination, collected by class `icinga2::query_objects`. # define icinga2::object::host ( - Stdlib::Absolutepath $target, - Enum['absent', 'present'] $ensure = present, - String $host_name = $title, - Array $import = [], - Optional[Stdlib::Host] $address = undef, - Optional[Stdlib::Host] $address6 = undef, - Optional[Icinga2::CustomAttributes] $vars = undef, - Optional[Array] $groups = undef, - Optional[String] $display_name = undef, - Optional[String] $check_command = undef, - Optional[Integer[1]] $max_check_attempts = undef, - Optional[String] $check_period = undef, - Optional[Icinga2::Interval] $check_timeout = undef, - Optional[Icinga2::Interval] $check_interval = undef, - Optional[Icinga2::Interval] $retry_interval = undef, - Optional[Boolean] $enable_notifications = undef, - Optional[Boolean] $enable_active_checks = undef, - Optional[Boolean] $enable_passive_checks = undef, - Optional[Boolean] $enable_event_handler = undef, - Optional[Boolean] $enable_flapping = undef, - Optional[Boolean] $enable_perfdata = undef, - Optional[String] $event_command = undef, - Optional[Integer[1]] $flapping_threshold_low = undef, - Optional[Integer[1]] $flapping_threshold_high = undef, - Optional[Boolean] $volatile = undef, - Optional[String] $zone = undef, - Optional[String] $command_endpoint = undef, - Optional[String] $notes = undef, - Optional[String] $notes_url = undef, - Optional[String] $action_url = undef, - Optional[String] $icon_image = undef, - Optional[String] $icon_image_alt = undef, - Boolean $template = false, - Variant[String, Integer] $order = 50, - Variant[Array[String], String] $export = [], + Stdlib::Absolutepath $target, + Enum['absent', 'present'] $ensure = present, + String[1] $host_name = $title, + Array[String[1]] $import = [], + Optional[Stdlib::Host] $address = undef, + Optional[Stdlib::Host] $address6 = undef, + Optional[Icinga2::CustomAttributes] $vars = undef, + Optional[Array[String[1]]] $groups = undef, + Optional[String[1]] $display_name = undef, + Optional[String[1]] $check_command = undef, + Optional[Integer[1]] $max_check_attempts = undef, + Optional[String[1]] $check_period = undef, + Optional[Icinga2::Interval] $check_timeout = undef, + Optional[Icinga2::Interval] $check_interval = undef, + Optional[Icinga2::Interval] $retry_interval = undef, + Optional[Boolean] $enable_notifications = undef, + Optional[Boolean] $enable_active_checks = undef, + Optional[Boolean] $enable_passive_checks = undef, + Optional[Boolean] $enable_event_handler = undef, + Optional[Boolean] $enable_flapping = undef, + Optional[Boolean] $enable_perfdata = undef, + Optional[String[1]] $event_command = undef, + Optional[Integer[1]] $flapping_threshold_low = undef, + Optional[Integer[1]] $flapping_threshold_high = undef, + Optional[Boolean] $volatile = undef, + Optional[String[1]] $zone = undef, + Optional[String[1]] $command_endpoint = undef, + Optional[String[1]] $notes = undef, + Optional[String[1]] $notes_url = undef, + Optional[String[1]] $action_url = undef, + Optional[String[1]] $icon_image = undef, + Optional[String[1]] $icon_image_alt = undef, + Boolean $template = false, + Variant[String[1], Integer[0]] $order = 50, + Variant[Array[String[1]], String[1]] $export = [], ) { require icinga2::globals diff --git a/manifests/object/hostgroup.pp b/manifests/object/hostgroup.pp index c5de5f5b..b2d643a6 100644 --- a/manifests/object/hostgroup.pp +++ b/manifests/object/hostgroup.pp @@ -38,15 +38,15 @@ # Export object to destination, collected by class `icinga2::query_objects`. # define icinga2::object::hostgroup ( - Stdlib::Absolutepath $target, - Enum['absent', 'present'] $ensure = present, - String $hostgroup_name = $title, - Optional[String] $display_name = undef, - Optional[Array] $groups = undef, - Array $assign = [], - Array $ignore = [], - Variant[String, Integer] $order = 55, - Variant[Array[String], String] $export = [], + Stdlib::Absolutepath $target, + Enum['absent', 'present'] $ensure = present, + String[1] $hostgroup_name = $title, + Optional[String[1]] $display_name = undef, + Optional[Array] $groups = undef, + Array[String[1]] $assign = [], + Array[String[1]] $ignore = [], + Variant[String[1], Integer[0]] $order = 55, + Variant[Array[String[1]], String[1]] $export = [], ) { require icinga2::globals diff --git a/manifests/object/icingaapplication.pp b/manifests/object/icingaapplication.pp index ba121b3a..5df15b04 100644 --- a/manifests/object/icingaapplication.pp +++ b/manifests/object/icingaapplication.pp @@ -46,7 +46,7 @@ # define icinga2::object::icingaapplication ( Enum['absent', 'present'] $ensure = present, - String $app_name = $title, + String[1] $app_name = $title, Optional[Boolean] $enable_notifications = undef, Optional[Boolean] $enable_event_handlers = undef, Optional[Boolean] $enable_flapping = undef, @@ -54,10 +54,10 @@ Optional[Boolean] $enable_service_checks = undef, Optional[Boolean] $enable_perfdata = undef, Optional[Icinga2::CustomAttributes] $vars = undef, - Optional[String] $environment = undef, + Optional[String[1]] $environment = undef, Optional[Stdlib::Absolutepath] $target = undef, - Variant[String, Integer] $order = 5, - Variant[Array[String], String] $export = [], + Variant[String[1], Integer[0]] $order = 5, + Variant[Array[String[1]], String[1]] $export = [], ) { require icinga2::globals $conf_dir = $icinga2::globals::conf_dir diff --git a/manifests/object/notification.pp b/manifests/object/notification.pp index 10bbc91d..d44c77b5 100644 --- a/manifests/object/notification.pp +++ b/manifests/object/notification.pp @@ -84,28 +84,28 @@ define icinga2::object::notification ( Stdlib::Absolutepath $target, Enum['absent', 'present'] $ensure = present, - String $notification_name = $title, - Optional[String] $host_name = undef, - Optional[String] $service_name = undef, + String[1] $notification_name = $title, + Optional[String[1]] $host_name = undef, + Optional[String[1]] $service_name = undef, Optional[Icinga2::CustomAttributes] $vars = undef, - Optional[Variant[String, Array]] $users = undef, - Optional[Variant[String, Array]] $user_groups = undef, - Optional[Hash] $times = undef, - Optional[String] $command = undef, + Optional[Variant[String[1], Array[String[1]]]] $users = undef, + Optional[Variant[String[1], Array[String[1]]]] $user_groups = undef, + Optional[Hash[String[1], Any]] $times = undef, + Optional[String[1]] $command = undef, Optional[Variant[Icinga2::Interval,Pattern[/(host|service)\./]]] $interval = undef, - Optional[String] $period = undef, - Optional[String] $zone = undef, - Optional[Variant[Array, String]] $types = undef, - Optional[Variant[Array, String]] $states = undef, - Variant[Boolean, String] $apply = false, - Variant[Boolean, String] $prefix = false, + Optional[String[1]] $period = undef, + Optional[String[1]] $zone = undef, + Optional[Variant[Array, String[1]]] $types = undef, + Optional[Variant[Array, String[1]]] $states = undef, + Variant[Boolean, String[1]] $apply = false, + Variant[Boolean, String[1]] $prefix = false, Enum['Host', 'Service'] $apply_target = 'Host', - Array $assign = [], - Array $ignore = [], - Array $import = [], + Array[String[1]] $assign = [], + Array[String[1]] $ignore = [], + Array[String[1]] $import = [], Boolean $template = false, - Variant[String, Integer] $order = 85, - Variant[Array[String], String] $export = [], + Variant[String[1], Integer[0]] $order = 85, + Variant[Array[String[1]], String[1]] $export = [], ) { require icinga2::globals diff --git a/manifests/object/notificationcommand.pp b/manifests/object/notificationcommand.pp index bacae876..cfe020ba 100644 --- a/manifests/object/notificationcommand.pp +++ b/manifests/object/notificationcommand.pp @@ -46,16 +46,16 @@ define icinga2::object::notificationcommand ( Stdlib::Absolutepath $target, Enum['absent', 'present'] $ensure = present, - String $notificationcommand_name = $title, - Optional[Variant[Array, String]] $command = undef, - Optional[Hash] $env = undef, + String[1] $notificationcommand_name = $title, + Optional[Variant[Array, String[1]]] $command = undef, + Optional[Hash[String[1], Any]] $env = undef, Optional[Icinga2::CustomAttributes] $vars = undef, Optional[Icinga2::Interval] $timeout = undef, - Optional[Hash] $arguments = undef, + Optional[Variant[Hash, String]] $arguments = undef, Boolean $template = false, - Array $import = [], - Variant[String, Integer] $order = 25, - Variant[Array[String], String] $export = [], + Array[String[1]] $import = [], + Variant[String[1], Integer[0]] $order = 25, + Variant[Array[String[1]], String[1]] $export = [], ) { require icinga2::globals diff --git a/manifests/object/scheduleddowntime.pp b/manifests/object/scheduleddowntime.pp index d16e1019..6632d650 100644 --- a/manifests/object/scheduleddowntime.pp +++ b/manifests/object/scheduleddowntime.pp @@ -55,23 +55,23 @@ # Export object to destination, collected by class `icinga2::query_objects`. # define icinga2::object::scheduleddowntime ( - Stdlib::Absolutepath $target, - Enum['absent', 'present'] $ensure = present, - String $scheduleddowntime_name = $title, - Optional[String] $host_name = undef, - Optional[String] $service_name = undef, - Optional[String] $author = undef, - Optional[String] $comment = undef, - Optional[Boolean] $fixed = undef, - Optional[Icinga2::Interval] $duration = undef, - Optional[Hash] $ranges = undef, - Variant[Boolean, String] $apply = false, - Variant[Boolean, String] $prefix = false, - Enum['Host', 'Service'] $apply_target = 'Host', - Array $assign = [], - Array $ignore = [], - Variant[String, Integer] $order = 90, - Variant[Array[String], String] $export = [], + Stdlib::Absolutepath $target, + Enum['absent', 'present'] $ensure = present, + String[1] $scheduleddowntime_name = $title, + Optional[String[1]] $host_name = undef, + Optional[String[1]] $service_name = undef, + Optional[String[1]] $author = undef, + Optional[String[1]] $comment = undef, + Optional[Boolean] $fixed = undef, + Optional[Icinga2::Interval] $duration = undef, + Optional[Hash] $ranges = undef, + Variant[Boolean, String[1]] $apply = false, + Variant[Boolean, String[1]] $prefix = false, + Enum['Host', 'Service'] $apply_target = 'Host', + Array[String[1]] $assign = [], + Array[String[1]] $ignore = [], + Variant[String[1], Integer[1]] $order = 90, + Variant[Array[String[1]], String[1]] $export = [], ) { require icinga2::globals diff --git a/manifests/object/service.pp b/manifests/object/service.pp index 2c62ef84..ebc16d16 100644 --- a/manifests/object/service.pp +++ b/manifests/object/service.pp @@ -151,14 +151,14 @@ define icinga2::object::service ( Stdlib::Absolutepath $target, Enum['absent', 'present'] $ensure = present, - String $service_name = $title, - Optional[String] $display_name = undef, - Optional[String] $host_name = undef, - Optional[Array] $groups = undef, + String[1] $service_name = $title, + Optional[String[1]] $display_name = undef, + Optional[String[1]] $host_name = undef, + Optional[Array[String[1]]] $groups = undef, Optional[Icinga2::CustomAttributes] $vars = undef, - Optional[String] $check_command = undef, + Optional[String[1]] $check_command = undef, Optional[Integer[1]] $max_check_attempts = undef, - Optional[String] $check_period = undef, + Optional[String[1]] $check_period = undef, Optional[Icinga2::Interval] $check_timeout = undef, Optional[Icinga2::Interval] $check_interval = undef, Optional[Icinga2::Interval] $retry_interval = undef, @@ -168,25 +168,25 @@ Optional[Boolean] $enable_event_handler = undef, Optional[Boolean] $enable_flapping = undef, Optional[Boolean] $enable_perfdata = undef, - Optional[String] $event_command = undef, + Optional[String[1]] $event_command = undef, Optional[Integer[1]] $flapping_threshold_low = undef, Optional[Integer[1]] $flapping_threshold_high = undef, Optional[Boolean] $volatile = undef, - Optional[String] $zone = undef, - Optional[String] $command_endpoint = undef, - Optional[String] $notes = undef, - Optional[String] $notes_url = undef, - Optional[String] $action_url = undef, - Optional[String] $icon_image = undef, - Optional[String] $icon_image_alt = undef, - Variant[Boolean, String] $apply = false, - Variant[Boolean, String] $prefix = false, - Array $assign = [], - Array $ignore = [], - Array $import = [], + Optional[String[1]] $zone = undef, + Optional[String[1]] $command_endpoint = undef, + Optional[String[1]] $notes = undef, + Optional[String[1]] $notes_url = undef, + Optional[String[1]] $action_url = undef, + Optional[String[1]] $icon_image = undef, + Optional[String[1]] $icon_image_alt = undef, + Variant[Boolean, String[1]] $apply = false, + Variant[Boolean, String[1]] $prefix = false, + Array[String[1]] $assign = [], + Array[String[1]] $ignore = [], + Array[String[1]] $import = [], Boolean $template = false, - Variant[String, Integer] $order = 60, - Variant[Array[String], String] $export = [], + Variant[String[1], Integer[0]] $order = 60, + Variant[Array[String[1]], String[1]] $export = [], ) { require icinga2::globals diff --git a/manifests/object/servicegroup.pp b/manifests/object/servicegroup.pp index 7bf60efb..fe206d68 100644 --- a/manifests/object/servicegroup.pp +++ b/manifests/object/servicegroup.pp @@ -29,24 +29,24 @@ # Destination config file to store in this object. File will be declared the # first time. # -# @param [Variant[String, Integer]] order +# @param order # String or integer to set the position in the target file, sorted alpha numeric. # # @param export # Export object to destination, collected by class `icinga2::query_objects`. # define icinga2::object::servicegroup ( - Stdlib::Absolutepath $target, - Enum['absent', 'present'] $ensure = present, - String $servicegroup_name = $title, - Optional[String] $display_name = undef, - Optional[Array] $groups = undef, - Array $assign = [], - Array $ignore = [], - Boolean $template = false, - Array $import = [], - Variant[String, Integer] $order = 65, - Variant[Array[String], String] $export = [], + Stdlib::Absolutepath $target, + Enum['absent', 'present'] $ensure = present, + String[1] $servicegroup_name = $title, + Optional[String[1]] $display_name = undef, + Optional[Array] $groups = undef, + Array[String[1]] $assign = [], + Array[String[1]] $ignore = [], + Boolean $template = false, + Array[String[1]] $import = [], + Variant[String[1], Integer[0]] $order = 65, + Variant[Array[String[1]], String[1]] $export = [], ) { require icinga2::globals diff --git a/manifests/object/timeperiod.pp b/manifests/object/timeperiod.pp index ddc26b77..3c0ed148 100644 --- a/manifests/object/timeperiod.pp +++ b/manifests/object/timeperiod.pp @@ -39,18 +39,18 @@ # Export object to destination, collected by class `icinga2::query_objects`. # define icinga2::object::timeperiod ( - Stdlib::Absolutepath $target, - Enum['absent', 'present'] $ensure = present, - String $timeperiod_name = $title, - Optional[String] $display_name = undef, - Optional[Hash] $ranges = undef, - Optional[Boolean] $prefer_includes = undef, - Optional[Array] $excludes = undef, - Optional[Array] $includes = undef, - Boolean $template = false, - Array $import = ['legacy-timeperiod'], - Variant[String, Integer] $order = 35, - Variant[Array[String], String] $export = [], + Stdlib::Absolutepath $target, + Enum['absent', 'present'] $ensure = present, + String[1] $timeperiod_name = $title, + Optional[String[1]] $display_name = undef, + Optional[Hash] $ranges = undef, + Optional[Boolean] $prefer_includes = undef, + Optional[Array[String[1]]] $excludes = undef, + Optional[Array[String[1]]] $includes = undef, + Boolean $template = false, + Array[String[1]] $import = ['legacy-timeperiod'], + Variant[String[1], Integer[0]] $order = 35, + Variant[Array[String[1]], String[1]] $export = [], ) { require icinga2::globals diff --git a/manifests/object/user.pp b/manifests/object/user.pp index 9b280f0f..9549c5b3 100644 --- a/manifests/object/user.pp +++ b/manifests/object/user.pp @@ -55,22 +55,22 @@ # Export object to destination, collected by class `icinga2::query_objects`. # define icinga2::object::user ( - Stdlib::Absolutepath $target, - Enum['absent', 'present'] $ensure = present, - String $user_name = $title, - Optional[String] $display_name = undef, - Optional[String] $email = undef, - Optional[String] $pager = undef, - Optional[Icinga2::CustomAttributes] $vars = undef, - Optional[Array] $groups = undef, - Optional[Boolean] $enable_notifications = undef, - Optional[String] $period = undef, - Optional[Array] $types = undef, - Optional[Array] $states = undef, - Array $import = [], - Boolean $template = false, - Variant[String, Integer] $order = 75, - Variant[Array[String], String] $export = [], + Stdlib::Absolutepath $target, + Enum['absent', 'present'] $ensure = present, + String[1] $user_name = $title, + Optional[String[1]] $display_name = undef, + Optional[String[1]] $email = undef, + Optional[String[1]] $pager = undef, + Optional[Icinga2::CustomAttributes] $vars = undef, + Optional[Array[String[1]]] $groups = undef, + Optional[Boolean] $enable_notifications = undef, + Optional[String[1]] $period = undef, + Optional[Array[String[1]]] $types = undef, + Optional[Array[String[1]]] $states = undef, + Array[String[1]] $import = [], + Boolean $template = false, + Variant[String[1], Integer[1]] $order = 75, + Variant[Array[String[1]], String[1]] $export = [], ) { require icinga2::globals diff --git a/manifests/object/usergroup.pp b/manifests/object/usergroup.pp index 89c57e0c..516eaadd 100644 --- a/manifests/object/usergroup.pp +++ b/manifests/object/usergroup.pp @@ -36,17 +36,17 @@ # Export object to destination, collected by class `icinga2::query_objects`. # define icinga2::object::usergroup ( - Stdlib::Absolutepath $target, - Enum['absent', 'present'] $ensure = present, - String $usergroup_name = $title, - Optional[String] $display_name = undef, - Array $groups = [], - Array $assign = [], - Array $ignore = [], - Array $import = [], - Boolean $template = false, - Variant[String, Integer] $order = 80, - Variant[Array[String], String] $export = [], + Stdlib::Absolutepath $target, + Enum['absent', 'present'] $ensure = present, + String[1] $usergroup_name = $title, + Optional[String[1]] $display_name = undef, + Array[String[1]] $groups = [], + Array[String[1]] $assign = [], + Array[String[1]] $ignore = [], + Array[String[1]] $import = [], + Boolean $template = false, + Variant[String[1], Integer[0]] $order = 80, + Variant[Array[String[1]], String[1]] $export = [], ) { require icinga2::globals diff --git a/manifests/object/zone.pp b/manifests/object/zone.pp index 99a712de..9e07f4a8 100644 --- a/manifests/object/zone.pp +++ b/manifests/object/zone.pp @@ -28,14 +28,14 @@ # Export object to destination, collected by class `icinga2::query_objects`. # define icinga2::object::zone ( - Enum['absent', 'present'] $ensure = present, - String $zone_name = $title, - Array $endpoints = [], - Optional[String] $parent = undef, - Boolean $global = false, - Optional[Stdlib::Absolutepath] $target = undef, - Variant[String, Integer] $order = 45, - Variant[Array[String], String] $export = [], + Enum['absent', 'present'] $ensure = present, + String[1] $zone_name = $title, + Array[String[1]] $endpoints = [], + Optional[String[1]] $parent = undef, + Boolean $global = false, + Optional[Stdlib::Absolutepath] $target = undef, + Variant[String[1], Integer[0]] $order = 45, + Variant[Array[String[1]], String[1]] $export = [], ) { require icinga2::globals $conf_dir = $icinga2::globals::conf_dir diff --git a/manifests/query_objects.pp b/manifests/query_objects.pp index 1a11c0e8..ab3d9370 100644 --- a/manifests/query_objects.pp +++ b/manifests/query_objects.pp @@ -8,8 +8,8 @@ # limits the response to objects of these environments if set, all environments if list is empty # class icinga2::query_objects ( - String $destination = $facts['networking']['fqdn'], - Array[String] $environments = [$environment], + String[1] $destination = $facts['networking']['fqdn'], + Array[String[1]] $environments = [$environment], ) { $_environments = if empty($environments) { '' diff --git a/metadata.json b/metadata.json index 36f54816..f52d67a9 100644 --- a/metadata.json +++ b/metadata.json @@ -18,10 +18,16 @@ }, { "name": "icinga/icinga", - "version_requirement": ">= 2.9.0 < 7.0.0" + "version_requirement": ">= 3.0.0 < 7.0.0" } ], "operatingsystem_support": [ + { + "operatingsystem": "CentOS", + "operatingsystemrelease": [ + "9" + ] + }, { "operatingsystem": "OracleLinux", "operatingsystemrelease": [ @@ -69,7 +75,7 @@ "operatingsystem": "Fedora", "operatingsystemrelease": [ "39", - "40" + "40" ] }, { diff --git a/types/basicauth.pp b/types/basicauth.pp index 12ee11b3..61b4fb7a 100644 --- a/types/basicauth.pp +++ b/types/basicauth.pp @@ -1,5 +1,5 @@ # A strict type for basic authentication type Icinga2::BasicAuth = Struct[{ - 'username' => String, - 'password' => Variant[String, Sensitive[String]], + 'username' => String[1], + 'password' => Variant[String[1], Sensitive[String[1]]], }] diff --git a/types/idocleanup.pp b/types/idocleanup.pp index 2899e747..6393062b 100644 --- a/types/idocleanup.pp +++ b/types/idocleanup.pp @@ -17,4 +17,4 @@ 'servicechecks_age', 'systemcommands_age', ], -String] +String[1]] diff --git a/types/interval.pp b/types/interval.pp index 896f0a29..15470f13 100644 --- a/types/interval.pp +++ b/types/interval.pp @@ -1,2 +1,2 @@ # A strict type for intervals -type Icinga2::Interval = Variant[Integer, Pattern[/\A\d+\.?\d*[d|h|m|s]?\Z/, /\A\$.+\$\Z/, /\A(host|service)\..+/]] +type Icinga2::Interval = Variant[Integer[0], Pattern[/\A\d+\.?\d*[d|h|m|s]?\Z/, /\A\$.+\$\Z/, /\A(host|service)\..+/]]