Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Replace icinga2::cert function wirh icinga::cert::files #749

Merged
merged 1 commit into from
Dec 22, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
55 changes: 0 additions & 55 deletions REFERENCE.md
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,6 @@ start on boot and will be restarted if stopped.

### Functions

* [`icinga2::cert`](#icinga2--cert): Choose the path of tls key, cert and ca file.
* [`icinga2::icinga2_attributes`](#icinga2--icinga2_attributes): Calls the simple parser to decide what to quote.
For more information, see lib/puppet_x/icinga2/utils.rb.
* [`icinga2::icinga2_ticket_id`](#icinga2--icinga2_ticket_id): Summarise what the function does here
Expand Down Expand Up @@ -5531,60 +5530,6 @@ Default value: `[]`

## Functions

### <a name="icinga2--cert"></a>`icinga2::cert`

Type: Puppet Language

Choose the path of tls key, cert and ca file.

#### `icinga2::cert(String $name, Optional[Stdlib::Absolutepath] $key_file = undef, Optional[Stdlib::Absolutepath] $cert_file = undef, Optional[Stdlib::Absolutepath] $cacert_file = undef, Optional[Variant[String, Sensitive[String]]] $key = undef, Optional[String] $cert = undef, Optional[String] $cacert = undef)`

The icinga2::cert function.

Returns: `Hash` Returned hash includes all paths and the key, cert and cacert.

##### `name`

Data type: `String`



##### `key_file`

Data type: `Optional[Stdlib::Absolutepath]`



##### `cert_file`

Data type: `Optional[Stdlib::Absolutepath]`



##### `cacert_file`

Data type: `Optional[Stdlib::Absolutepath]`



##### `key`

Data type: `Optional[Variant[String, Sensitive[String]]]`



##### `cert`

Data type: `Optional[String]`



##### `cacert`

Data type: `Optional[String]`



### <a name="icinga2--icinga2_attributes"></a>`icinga2::icinga2_attributes`

Type: Ruby 4.x API
Expand Down
82 changes: 0 additions & 82 deletions functions/cert.pp

This file was deleted.

3 changes: 2 additions & 1 deletion manifests/feature/elasticsearch.pp
Original file line number Diff line number Diff line change
Expand Up @@ -109,8 +109,9 @@
}

if $enable_ssl {
$cert = icinga2::cert(
$cert = icinga::cert::files(
'ElasticsearchWriter_elasticsearch',
$ssl_dir,
$ssl_key_path,
$ssl_cert_path,
$ssl_cacert_path,
Expand Down
3 changes: 2 additions & 1 deletion manifests/feature/gelf.pp
Original file line number Diff line number Diff line change
Expand Up @@ -79,8 +79,9 @@
}

if $enable_ssl {
$cert = icinga2::cert(
$cert = icinga::cert::files(
'GelfWriter_gelf',
$ssl_dir,
$ssl_key_path,
$ssl_cert_path,
$ssl_cacert_path,
Expand Down
3 changes: 2 additions & 1 deletion manifests/feature/icingadb.pp
Original file line number Diff line number Diff line change
Expand Up @@ -124,8 +124,9 @@
}

if $enable_tls {
$cert = icinga2::cert(
$cert = icinga::cert::files(
'IcingaDB-icingadb',
$ssl_dir,
$tls_key_file,
$tls_cert_file,
$tls_cacert_file,
Expand Down
3 changes: 2 additions & 1 deletion manifests/feature/idomysql.pp
Original file line number Diff line number Diff line change
Expand Up @@ -148,8 +148,9 @@
}

if $enable_ssl {
$cert = icinga2::cert(
$cert = icinga::cert::files(
'IdoMysqlConnection_ido-mysql',
$ssl_dir,
$ssl_key_path,
$ssl_cert_path,
$ssl_cacert_path,
Expand Down
3 changes: 2 additions & 1 deletion manifests/feature/idopgsql.pp
Original file line number Diff line number Diff line change
Expand Up @@ -134,8 +134,9 @@
}

if $enable_ssl {
$cert = icinga2::cert(
$cert = icinga::cert::files(
'IdoPgsqlConnection_ido-pgsql',
$ssl_dir,
$ssl_key_path,
$ssl_cert_path,
$ssl_cacert_path,
Expand Down
3 changes: 2 additions & 1 deletion manifests/feature/influxdb.pp
Original file line number Diff line number Diff line change
Expand Up @@ -148,8 +148,9 @@
$service_template = { measurement => $service_measurement, tags => $service_tags }

if $enable_ssl {
$cert = icinga2::cert(
$cert = icinga::cert::files(
'InfluxdbWriter_influxdb',
$ssl_dir,
$ssl_key_path,
$ssl_cert_path,
$ssl_cacert_path,
Expand Down
3 changes: 2 additions & 1 deletion manifests/feature/influxdb2.pp
Original file line number Diff line number Diff line change
Expand Up @@ -126,8 +126,9 @@
$service_template = { measurement => $service_measurement, tags => $service_tags }

if $enable_ssl {
$cert = icinga2::cert(
$cert = icinga::cert::files(
'Influxdb2Writer_influxdb2',
$ssl_dir,
$ssl_key_path,
$ssl_cert_path,
$ssl_cacert_path,
Expand Down
65 changes: 0 additions & 65 deletions spec/functions/cert_spec.rb

This file was deleted.