diff --git a/REFERENCE.md b/REFERENCE.md
index 141be7dd..85ad7ebf 100644
--- a/REFERENCE.md
+++ b/REFERENCE.md
@@ -82,7 +82,6 @@ For more information, see lib/puppet_x/icinga2/utils.rb.
* [`icinga2::icinga2_ticket_id`](#icinga2--icinga2_ticket_id): Summarise what the function does here
* [`icinga2::newline`](#icinga2--newline): Replace newlines for Windows systems.
* [`icinga2::parse`](#icinga2--parse)
-* [`icinga2::unwrap`](#icinga2--unwrap): This function returns an unwrap string if necessary.
### Data types
@@ -5753,24 +5752,6 @@ Data type: `Hash[String, Any]`
-### `icinga2::unwrap`
-
-Type: Puppet Language
-
-This function returns an unwrap string if necessary.
-
-#### `icinga2::unwrap(Optional[Variant[String, Sensitive[String]]] $arg = undef)`
-
-The icinga2::unwrap function.
-
-Returns: `Any` The unwraped string.
-
-##### `arg`
-
-Data type: `Optional[Variant[String, Sensitive[String]]]`
-
-
-
## Data types
### `Icinga2::BasicAuth`
diff --git a/functions/db/connect.pp b/functions/db/connect.pp
index 8191246c..9be99007 100644
--- a/functions/db/connect.pp
+++ b/functions/db/connect.pp
@@ -72,7 +72,7 @@ function icinga2::db::connect(
'dbname=' => $db['database'],
})), ' '), '= ', '=', 'G')
} else {
- $_password = icinga2::unwrap($db['password'])
+ $_password = unwrap($db['password'])
$options = join(any2array(delete_undef_values({
'-h' => $db['host'] ? {
/localhost/ => undef,
diff --git a/functions/unwrap.pp b/functions/unwrap.pp
deleted file mode 100644
index e91b9322..00000000
--- a/functions/unwrap.pp
+++ /dev/null
@@ -1,16 +0,0 @@
-# @summary
-# This function returns an unwrap string if necessary.
-#
-# @return
-# The unwraped string.
-#
-function icinga2::unwrap(Optional[Variant[String, Sensitive[String]]] $arg = undef) {
- # @param arg
- # A sensitive or string.
- #
- if $arg =~ Sensitive {
- $arg.unwrap
- } else {
- $arg
- }
-}
diff --git a/manifests/feature/idopgsql.pp b/manifests/feature/idopgsql.pp
index 224c2f03..7c3041ac 100644
--- a/manifests/feature/idopgsql.pp
+++ b/manifests/feature/idopgsql.pp
@@ -217,7 +217,7 @@
exec { 'idopgsql-import-schema':
user => 'root',
path => $facts['path'],
- environment => [sprintf('PGPASSWORD=%s', icinga2::unwrap($password))],
+ environment => [sprintf('PGPASSWORD=%s', unwrap($password))],
command => "psql '${db_cli_options}' -w -f '${ido_pgsql_schema}'",
unless => "psql '${db_cli_options}' -w -c 'select version from icinga_dbversion'",
}
diff --git a/manifests/tls/client.pp b/manifests/tls/client.pp
index 89d66ae0..74094717 100644
--- a/manifests/tls/client.pp
+++ b/manifests/tls/client.pp
@@ -26,10 +26,10 @@
$key_mode = '0400'
}
- if icinga2::unwrap($args[key]) {
+ if unwrap($args[key]) {
file { $args['key_file']:
ensure => file,
- content => icinga2::newline(icinga2::unwrap($args['key'])),
+ content => icinga2::newline(unwrap($args['key'])),
mode => $key_mode,
show_diff => false,
}