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 duplicate function icinga::unwrap with built-in unwrap function #103

Merged
merged 1 commit into from
Dec 31, 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
19 changes: 0 additions & 19 deletions REFERENCE.md
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,6 @@ PHP and a Webserver.
with or without TLS information.
* [`icinga::newline`](#icinga--newline): Replace newlines for Windows systems.
* [`icinga::prepare_web`](#icinga--prepare_web): This funktion checks for web preparation and display a warning if fails
* [`icinga::unwrap`](#icinga--unwrap): This function returns an unwrap string if necessary.

### Data types

Expand Down Expand Up @@ -2035,24 +2034,6 @@ Data type: `String`



### <a name="icinga--unwrap"></a>`icinga::unwrap`

Type: Puppet Language

This function returns an unwrap string if necessary.

#### `icinga::unwrap(Optional[Variant[String, Sensitive[String]]] $arg = undef)`

The icinga::unwrap function.

Returns: `Any` The unwraped string.

##### `arg`

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



## Data types

### <a name="Icinga--Certificate"></a>`Icinga::Certificate`
Expand Down
2 changes: 1 addition & 1 deletion functions/db/connect.pp
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ function icinga::db::connect(
'dbname=' => $db['database'],
})), ' '), '= ', '=', 'G')
} else {
$_password = icinga::unwrap($db['password'])
$_password = unwrap($db['password'])
$options = join(any2array(delete_undef_values({
'-h' => $db['host'] ? {
/localhost/ => undef,
Expand Down
16 changes: 0 additions & 16 deletions functions/unwrap.pp

This file was deleted.

2 changes: 1 addition & 1 deletion manifests/cert.pp
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@
if $args[key] {
file { $args['key_file']:
ensure => file,
content => icinga::newline(icinga::unwrap($args['key'])),
content => icinga::newline(unwrap($args['key'])),
mode => $key_mode,
show_diff => false,
}
Expand Down
2 changes: 1 addition & 1 deletion manifests/database.pp
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@
}

if versioncmp($facts['puppetversion'], '6.0.0') < 0 or ($facts['os']['family'] == 'redhat' and Integer($facts['os']['release']['major']) < 8) {
$_pass = icinga::unwrap($db_pass)
$_pass = unwrap($db_pass)
} else {
$_pass = postgresql::postgresql_password($db_user, $db_pass, false, $postgresql::server::password_encryption)
}
Expand Down
2 changes: 1 addition & 1 deletion manifests/init.pp
Original file line number Diff line number Diff line change
Expand Up @@ -213,7 +213,7 @@
"${icinga_home}/.ssh/id_${ssh_key_type}":
mode => '0600',
show_diff => false,
content => icinga::unwrap($ssh_private_key);
content => unwrap($ssh_private_key);
"${icinga_home}/.ssh/config":
content => "Host *\n StrictHostKeyChecking no\n ControlPath ${icinga_home}/.ssh/controlmasters/%r@%h:%p.socket\n ControlMaster auto\n ControlPersist 5m";
}
Expand Down
Loading