linux:puppet:useful_docs
This is an old revision of the document!
Table of Contents
Puppet useful info/links
link
How to store linux command output into a variable in puppet
Quote
If you want to execute any command on Puppet Master server you can use inlinetemplate function with ERB template inside and Ruby code for execute shell command:
<code ruby>
$password = “12345”
$secretvalue = inlinetemplate(“<%= /bin/echo ${password} | /usr/bin/base64
%>”)
notify { “STDOUT: ${secretvalue}”: }
</code>
P.S. If you just want to encode string to Base64 format you can import puppetlabs-stdlib module and use base64 function from it:
$secretvalue = base64('encode', $password)
linux/puppet/useful_docs.1669111888.txt.gz · Last modified: 2022/11/22 10:11 by dodger