Skip to content

Commit

Permalink
Merge pull request #339 from cocker-cc/Issue_338_Sensitive_Data
Browse files Browse the repository at this point in the history
Allow Sensitive `$auth_pass`
  • Loading branch information
TheMeier authored Jun 2, 2024
2 parents 91c2dac + 98178c6 commit 036265a
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 3 deletions.
7 changes: 6 additions & 1 deletion manifests/vrrp/instance.pp
Original file line number Diff line number Diff line change
Expand Up @@ -287,9 +287,14 @@
}
}

$_content = if $auth_pass =~ Sensitive {
Sensitive(template('keepalived/vrrp_instance.erb'))
} else {
template('keepalived/vrrp_instance.erb')
}
concat::fragment { "keepalived.conf_vrrp_instance_${_name}":
target => "${keepalived::config_dir}/keepalived.conf",
content => template('keepalived/vrrp_instance.erb'),
content => $_content,
order => "100-${_ordersafe}-000",
}

Expand Down
2 changes: 1 addition & 1 deletion metadata.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
"dependencies": [
{
"name": "puppetlabs/concat",
"version_requirement": ">= 4.1.0 < 10.0.0"
"version_requirement": ">= 7.4.0 < 10.0.0"
},
{
"name": "puppetlabs/stdlib",
Expand Down
2 changes: 1 addition & 1 deletion spec/defines/keepalived_vrrp_instance_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -348,7 +348,7 @@
it {
is_expected.to \
contain_concat__fragment('keepalived.conf_vrrp_instance__NAME_').with(
'content' => %r{auth_pass.*_VALUE_}
'content' => sensitive(%r{auth_pass.*_VALUE_})
)
}
end
Expand Down

0 comments on commit 036265a

Please sign in to comment.