Hi, If I have a resource in a class like file { somefile: ensure => present, ... } Is there a puppet command to list any reference to it, e.g. - " require => File[somefile] " - among all the class definitions? Of course there''s always unix grep, but a puppet command would be nicer. TIA John --~--~---------~--~----~------------~-------~--~----~ 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+unsubscribe@googlegroups.com For more options, visit this group at http://groups.google.com/group/puppet-users?hl=en -~----------~----~----~----~------~----~------~--~---
David Schmitt
2009-Jul-27 06:39 UTC
[Puppet Users] Re: command to list intra-class references?
eagleheart wrote:> Hi, > > If I have a resource in a class like > > file { somefile: > ensure => present, > ... } > > Is there a puppet command to list any reference to it, e.g. - > " require => File[somefile] " > - among all the class definitions? > > Of course there''s always unix grep, but a puppet command would be > nicer.You can use --graph to produce a .dot file with all resources from a given compilation. Since references know both variables and aliases, grep won''t suffice anyways and I''m not sure even puppet could answer this in the general case (think external nodes bringing in unknown variables). Regards, DavidS --~--~---------~--~----~------------~-------~--~----~ 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+unsubscribe@googlegroups.com For more options, visit this group at http://groups.google.com/group/puppet-users?hl=en -~----------~----~----~----~------~----~------~--~---
John Ingersoll
2009-Aug-04 14:03 UTC
[Puppet Users] Re: command to list intra-class references?
On Mon, Jul 27, 2009 at 2:39 AM, David Schmitt <david@dasz.at> wrote:> > You can use --graph to produce a .dot file with all resources from a > given compilation. Since references know both variables and aliases, > grep won''t suffice anyways and I''m not sure even puppet could answer > this in the general case (think external nodes bringing in unknown > variables). > > > Regards, DavidS > >Thanks, and sorry for the delay. I''m guessing that''s "puppet --graph" on the client, correct? I''ve tried such on both the client and server (which is a client to itself I suppose) but it just hangs there for a long time. Finally just kill the command. -- John Ingersoll, Jr. Usage: fortune -P [] -a [xsz] [Q: [file]] [rKe9] -v6[+] dataspec ... inputdir --~--~---------~--~----~------------~-------~--~----~ 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+unsubscribe@googlegroups.com For more options, visit this group at http://groups.google.com/group/puppet-users?hl=en -~----------~----~----~----~------~----~------~--~---