Great Ken! I (strongly :-) suggest to place this function (in a generic class- agnostic shape) in the puppetlabs-stdlib
Thank you Al On Oct 26, 1:10 am, Ken Barber <k...@puppetlabs.com> wrote: > Hi Al :-). > > I've been working on this for the kwalify module so I can validate the > inputs for a resource/class: > > https://github.com/kbarber/puppetlabs-kwalify/blob/ticket/10136-get_s... > > Its still in a topic branch in my own personal clone and very much > draft as I've been trying to find good ways to write spec tests for > it. But it should do the trick. > > It returns a hash - which you could then convert to a yaml document if you > like. > > ken. > > > > > > > > On Tue, Oct 25, 2011 at 11:25 PM, Alessandro Franceschi <a...@lab42.it> wrote: > > Dear all, > > is there a way to access in a template to all the parameters that are > > passed/defined in a class? > > > I mean, something like: > > file { "puppi_openssh": > > path => "${settings::vardir}/puppi/openssh", > > mode => "0640", > > owner => "root", > > group => "root", > > ensure => present, > > content => inline_template("<%= scope.to_yaml %>"), > > } > > > but instead of accessing to all the variables in the scope (as in > > scope.to_yaml ) I want to show only the variables passed to a > > parametrized class or a define (something like: openssh::*.to_yaml ) > > > The point is to have a quick and generic way to pass Puppet knowledge > > (the variables defined/used) about a class, to a local file, that can > > be used in various interesting ways. > > > If there's no way to do that, does anyone find this worth a feature > > request? > > > Best, > > Alessandro Franceschi > > > -- > > You received this message because you are subscribed to the Google Groups > > "Puppet Users" group. > > To post to this group, send email to puppet-users@googlegroups.com. > > To unsubscribe from this group, send email to > > puppet-users+unsubscr...@googlegroups.com. > > For more options, visit this group > > athttp://groups.google.com/group/puppet-users?hl=en. -- You received this message because you are subscribed to the Google Groups "Puppet Users" group. To post to this group, send email to puppet-users@googlegroups.com. To unsubscribe from this group, send email to puppet-users+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/puppet-users?hl=en.