This shows you the differences between two versions of the page.
Both sides previous revision Previous revision Next revision | Previous revision Next revision Both sides next revision | ||
puppet [2019/01/21 18:11] k2patel [Puppet Dynamic values playground] |
puppet [2019/01/30 18:28] k2patel [Troubleshooting] |
||
---|---|---|---|
Line 45: | Line 45: | ||
==== trimming values ==== | ==== trimming values ==== | ||
Following can grab the last character from the hostname and convert to integer to avoid warning. | Following can grab the last character from the hostname and convert to integer to avoid warning. | ||
- | <code> | + | <code ruby> |
$esnumber = inline_epp('<%= Integer.new($::hostname[-1,1]) + 1 %>') | $esnumber = inline_epp('<%= Integer.new($::hostname[-1,1]) + 1 %>') | ||
</code> | </code> | ||
Line 316: | Line 316: | ||
psql puppetdb -c 'create extension pg_trgm'; | psql puppetdb -c 'create extension pg_trgm'; | ||
</code> | </code> | ||
+ | |||
+ | === Mapping values === | ||
+ | <code ruby> | ||
+ | <%- $ips = $vs_map[$name].map |$val| { $val['address']['ip'] } -%> | ||
+ | </code> | ||
+ | |||
==== External Links ==== | ==== External Links ==== |