Don't you need a Deferred call to read into the hash, since it's a Deferred?

We use a Deferred inline_epp to do this:

```
$test = Deferred('vault_lookup::lookup', ["secret/data/test", 
'https://examplevault.com:8200'])
node default {
  notify { 'example':
    message => Deferred('inline_epp', ['<%= $test.unwrap[data][city] %>', { 
'test' => $test }]),
  }
}
```

I seem to recall seeing some changes to recent stdlib that might make this 
a bit easier as well.

On Thursday, March 2, 2023 at 11:02:32 AM UTC-8 [email protected] wrote:

$d['city']  should give you the city name and this will return the name 
$d['name'].
message => $d['city']
On Wednesday, March 1, 2023 at 11:45:27 AM UTC-5 [email protected] wrote:

Hi ,
 
I am trying to get secrets from vault. 

*vault*.*pp:*

$d = Deferred('vault_lookup::lookup', ["secret/data/test", 
'https://examplevault.com:8200'])

node default {
  notify { example :
    message => $d
  }
}

*The above file will give output* :
        Notice: {"data"=>{"city"=>"Bangalore", "name"=>"hari"}, 
"metadata"=>{"created_time"=>"2023-02-21T06:37:36.463680713Z", 
"deletion_time"=>"", "destroyed"=>false, "version"=>3}}

but How to get particular data (city and name values)

Thanks,

-- 
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/48be2b0e-541a-4b23-a4f2-cbf7f7205f59n%40googlegroups.com.

Reply via email to