Alessandro Franceschi
2011-Nov-06 09:12 UTC
[Puppet Users] How to show in a template all the variables of a define or parametrized class
Hi all,
is there a quick and elegant way to place, possibly as yaml file, all the
variables defined in a parametrized class (and a define?)
Something like:
file { "debug_openssh":
path => "${settings::vardir}/debug-openssh",
mode => "0640",
owner => "root",
group => "root",
content => inline_template("<%= scope.to_hash.reject { |k,v|
k.to_s
=~ /(uptime.*|path|timestamp|free|.*password.*|.*psk.*|.*key)/ }.to_yaml
%>"),
}
but instead of having the content => with the whole scope just limit the
output of the variables specified in the, for example, openssh parametrized
class.
Any help is very appreciated.
Al
--
You received this message because you are subscribed to the Google Groups
"Puppet Users" group.
To view this discussion on the web visit
https://groups.google.com/d/msg/puppet-users/-/8oGD5-CrD50J.
To post to this group, send email to puppet-users@googlegroups.com.
To unsubscribe from this group, send email to
puppet-users+unsubscribe@googlegroups.com.
For more options, visit this group at
http://groups.google.com/group/puppet-users?hl=en.