-
-
Notifications
You must be signed in to change notification settings - Fork 54
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
A deferred sensitive token is not unwrapped #201
Comments
$_foo = {
'x' => 'y',
'a' => Sensitive('b'),
}
$_bar = $_foo.each | $_k, $_v | { { $_k => $_v.unwrap } }.reduce | $_memo, $_hash | { $_memo + $_hash }
notify{"With Map ${_bar}":}
$_direct = {
'x' => 'y',
'a' => Sensitive('b').unwrap,
}
notify{"Direct ${_direct}":} results in:
why are the two notifies not the same.... |
I see this is what I am looking for - puppetlabs/puppetlabs-stdlib#1418 |
With this module it is easy to work around since config is already created in concat: class { 'gitlab_ci_runner':
runners => {
'foobar' => {
}
}
}
# Work around for https://github.com/voxpupuli/puppet-gitlab_ci_runner/issues/201
Concat_file <| title == '/etc/gitlab-runner/config.toml' |> {
show_diff => false,
}
concat::fragment{'add_token':
target => '/etc/gitlab-runner/config.toml',
order => '3',
content => Deferred('inline_epp',['token = "<%= $token %>"',{ 'token' => Deferred('myfunc', ['gl'])}]),
}
|
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Affected Puppet, Ruby, OS and module versions/distributions
How to reproduce (e.g Puppet code you use)
What are you seeing
Results in the file
/etc/gitlab-runner/config.toml
What behaviour did you expect instead
The file should contain the the token retrieved in a deferred context.
Output log
Any additional information you'd like to impart
Problem is around here: https://github.com/voxpupuli/puppet-gitlab_ci_runner/blob/master/manifests/runner.pp#L108
Where it does:
I believe you need to
.unwrap
the value of the token before passing it to the::to_toml
function but I'm failing tounderstand how to do that.
The text was updated successfully, but these errors were encountered: