User Tools

Site Tools


puppet

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
Next revision
Previous revision
Next revision Both sides next revision
puppet [2019/01/21 18:06]
k2patel [Variables in node / site maniefest]
puppet [2019/01/30 18:34]
k2patel [External Links]
Line 43: Line 43:
 ==== Puppet Dynamic values playground ==== ==== Puppet Dynamic values playground ====
  
 +==== trimming values ====
 +Following can grab the last character from the hostname and convert to integer to avoid warning.
 +<code ruby>
 +$esnumber = inline_epp('<​%= Integer.new($::​hostname[-1,​1]) + 1 %>'​)
 +</​code>​
 ==== Checking Hiera Value ==== ==== Checking Hiera Value ====
 **Trying to lookup vhostip value** **Trying to lookup vhostip value**
Line 311: 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 ====
Line 319: Line 330:
  
 [[ 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 ]]
puppet.txt ยท Last modified: 2020/08/10 02:35 (external edit)