Skip to content

Commit

Permalink
use undef instead of '' for borgbackup::ssh_key_define
Browse files Browse the repository at this point in the history
  • Loading branch information
trefzer committed Dec 7, 2024
1 parent 1037d7b commit cf99e1e
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 4 deletions.
6 changes: 3 additions & 3 deletions manifests/init.pp
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
# if we true (default) we create the .ssh directory
# @param ssh_key_define
# the resource to use for the generation of an ssh key
# defaults to ''
# defaults to undef
# @param ssh_key_res
# the parameters to use for the $ssh_key_define
# defaults to {}
Expand All @@ -35,7 +35,7 @@
class borgbackup (
String $configdir = '/etc/borgbackup',
Boolean $ensure_ssh_directory = true,
String $ssh_key_define = '',
Optional[String[1]] $ssh_key_define = undef,
Hash $ssh_key_res = {},
Hash $repos = { $facts['networking']['fqdn'] => {} },
Optional[String[1]] $default_target = undef,
Expand All @@ -61,7 +61,7 @@
}
}

if $ssh_key_define != '' {
if $ssh_key_define {
create_resources($ssh_key_define, $ssh_key_res)
}

Expand Down
1 change: 0 additions & 1 deletion spec/classes/borgbackup_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@
let :default_params do
{ configdir: '/etc/borgbackup',
ensure_ssh_directory: true,
ssh_key_define: '',
ssh_key_res: {},
repos_defaults: {} }
end
Expand Down

0 comments on commit cf99e1e

Please sign in to comment.