Answer is, it seems to work with Deferred('sprint', ['Password: %s', 
$db_password].
There are issues around special characters in the password string, like and 
exclamation point.

On Thursday, June 8, 2023 at 7:28:41 AM UTC-5 Bob Negri wrote:

> Is it possible to use Deferred with the command in resource type exec?
>
> The code we are trying to replace to use a Vault secret has an gpg key as 
> a passed in secret. I saw a code example in Ben Ford's blog post.
>
> notify { 'vault server debugging': # Defer interpolation to runtime after 
> the value is resolved. message => Deferred( 'sprintf', ['Password: %s', 
> $db_password] ), }
>
> I was wondering if similar logic could be used for exec? And maybe %p is 
> better for a key than %s.
>
>

-- 
You received this message because you are subscribed to the Google Groups 
"Puppet Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/puppet-users/60fb681e-2692-4e85-987a-6f70ffb4cfc9n%40googlegroups.com.

Reply via email to