Paul Archer
2013-Dec-13 22:29 UTC
[Puppet Users] how to see which classes are assigned to a node?
I''m trying to get my classes setup in hiera, but I''m having some issues, and having problems troubleshooting them. There doesn''t seem to be any way to query either the puppetmaster or the client to get a list of the classes that the client actually gets. Running ''puppet node find my.node.example.com'' should spit out a list of classes, but it doesn''t. Any suggestions? -- You received this message because you are subscribed to the Google Groups "Puppet Users" group. To unsubscribe from this group and stop receiving emails from it, send an email to puppet-users+unsubscribe@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/puppet-users/afa1919b-8824-404c-ad10-1666dbaf682e%40googlegroups.com. For more options, visit https://groups.google.com/groups/opt_out.
Mike Delaney
2013-Dec-13 22:45 UTC
Re: [Puppet Users] how to see which classes are assigned to a node?
On the client, the list of classes applied in the last successful puppet run should be written to $vardir/state/classes.txt On Fri, Dec 13, 2013 at 2:29 PM, Paul Archer <geek65535@gmail.com> wrote:> I''m trying to get my classes setup in hiera, but I''m having some issues, > and having problems troubleshooting them. > There doesn''t seem to be any way to query either the puppetmaster or the > client to get a list of the classes that the client actually gets. > > Running ''puppet node find my.node.example.com'' should spit out a list of > classes, but it doesn''t. > > Any suggestions? > > -- > You received this message because you are subscribed to the Google Groups > "Puppet Users" group. > To unsubscribe from this group and stop receiving emails from it, send an > email to puppet-users+unsubscribe@googlegroups.com. > To view this discussion on the web visit > https://groups.google.com/d/msgid/puppet-users/afa1919b-8824-404c-ad10-1666dbaf682e%40googlegroups.com > . > For more options, visit https://groups.google.com/groups/opt_out. >-- You received this message because you are subscribed to the Google Groups "Puppet Users" group. To unsubscribe from this group and stop receiving emails from it, send an email to puppet-users+unsubscribe@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/puppet-users/CAELFvUmnNXQtpT2eMM6Jj8Y2rczBYjKZMFi4Mh_bgrSPR%2BCS3w%40mail.gmail.com. For more options, visit https://groups.google.com/groups/opt_out.
Paul Archer
2013-Dec-16 19:17 UTC
Re: [Puppet Users] how to see which classes are assigned to a node?
I don''t have a ''classes.txt'' file: root@sftp-test2:/var/lib/puppet/state# l total 44 drwxr-xr-x. 2 root root 4096 Dec 4 13:09 graphs -rw-r-----. 1 root root 22128 Dec 13 10:40 last_run_report.yaml -rw-r--r--. 1 root root 521 Dec 13 10:40 last_run_summary.yaml -rw-r-----. 1 root root 263 Dec 13 10:40 resources.txt -rw-rw----. 1 root root 5775 Dec 13 10:40 state.yaml I ended up coming up with this (it works, but it''s clunky): grep /etc/puppet/modules last_run_* | awk ''{print $3}'' | awk -F/ ''{print $5}'' | sort -u On Friday, December 13, 2013 4:45:30 PM UTC-6, Mike Delaney wrote:> > On the client, the list of classes applied in the last successful puppet > run should be written to $vardir/state/classes.txt > > > On Fri, Dec 13, 2013 at 2:29 PM, Paul Archer <geek...@gmail.com<javascript:> > > wrote: > >> I''m trying to get my classes setup in hiera, but I''m having some issues, >> and having problems troubleshooting them. >> There doesn''t seem to be any way to query either the puppetmaster or the >> client to get a list of the classes that the client actually gets. >> >> Running ''puppet node find my.node.example.com'' should spit out a list of >> classes, but it doesn''t. >> >> Any suggestions? >> >> -- >> You received this message because you are subscribed to the Google Groups >> "Puppet Users" group. >> To unsubscribe from this group and stop receiving emails from it, send an >> email to puppet-users...@googlegroups.com <javascript:>. >> To view this discussion on the web visit >> https://groups.google.com/d/msgid/puppet-users/afa1919b-8824-404c-ad10-1666dbaf682e%40googlegroups.com >> . >> For more options, visit https://groups.google.com/groups/opt_out. >> > >-- You received this message because you are subscribed to the Google Groups "Puppet Users" group. To unsubscribe from this group and stop receiving emails from it, send an email to puppet-users+unsubscribe@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/puppet-users/e1a9f4ea-e0f9-4440-8d9b-b44ce2614b72%40googlegroups.com. For more options, visit https://groups.google.com/groups/opt_out.
Paul Archer
2013-Dec-16 19:32 UTC
Re: [Puppet Users] how to see which classes are assigned to a node?
grep /etc/puppet/modules /var/lib/puppet/state/last_run_report.yaml | awk ''{print $2}'' | awk -F/ ''{print $5}'' | sort -u -- You received this message because you are subscribed to the Google Groups "Puppet Users" group. To unsubscribe from this group and stop receiving emails from it, send an email to puppet-users+unsubscribe@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/puppet-users/b9bbec45-b157-4fdc-80bb-b9e2d415111f%40googlegroups.com. For more options, visit https://groups.google.com/groups/opt_out.