This shows you the differences between two versions of the page.
Both sides previous revision Previous revision Next revision | Previous revision | ||
puppet [2019/01/21 18:11] k2patel [trimming values] |
puppet [2020/08/10 02:35] (current) |
||
---|---|---|---|
Line 43: | Line 43: | ||
==== Puppet Dynamic values playground ==== | ==== Puppet Dynamic values playground ==== | ||
+ | === EPP and passing values === | ||
+ | <code ruby> | ||
+ | $template_parameters = { | ||
+ | test => $test1, | ||
+ | test2 => $test::test, | ||
+ | nice => $works, | ||
+ | } | ||
+ | |||
+ | content => epp('vsftpd/template.epp', $template_parameters), | ||
+ | </code> | ||
==== 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. | ||
Line 316: | Line 326: | ||
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 ==== | ||
Line 324: | Line 340: | ||
[[ https://groups.google.com/group/puppet-users/browse_thread/thread/e56e0f678a134089 | Incremental Number ]] | [[ https://groups.google.com/group/puppet-users/browse_thread/thread/e56e0f678a134089 | Incremental Number ]] | ||
+ | |||
+ | [[ https://github.com/jessereynolds/puppet_certificate_extensions_facts | Trusted facts example ]] |