how to see which classes are assigned to a node?

1.712 visualizzazioni
Passa al primo messaggio da leggere

Paul Archer

da leggere,
13 dic 2013, 17:29:3313/12/13
a puppet...@googlegroups.com
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?

Mike Delaney

da leggere,
13 dic 2013, 17:45:3013/12/13
a puppet...@googlegroups.com
On the client, the list of classes applied in the last successful puppet run should be written to $vardir/state/classes.txt


--
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.
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.

Paul Archer

da leggere,
16 dic 2013, 14:17:4516/12/13
a puppet...@googlegroups.com, mde...@computer.org
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

Paul Archer

da leggere,
16 dic 2013, 14:32:5816/12/13
a puppet...@googlegroups.com, mde...@computer.org

grep /etc/puppet/modules /var/lib/puppet/state/last_run_report.yaml | awk '{print $2}' | awk -F/ '{print $5}' | sort -u
Rispondi a tutti
Rispondi all'autore
Inoltra
0 nuovi messaggi