You could do something like this,  it's not the cleanest in the world(I 
barely ever use sed anymore), but as something quick and dirty:
curl -k -H "Accept: yaml" https://puppet:8140/mgmt/resource_types/class | 
more | grep " name: " | sed -e 's/^ *name: //;s/&id.* //' | sort | uniq

It'll have some bad data you'll have to parse out(built-in classes like 
notify, fail, etc.), but should work.

On Thursday, July 12, 2012 11:54:25 AM UTC-4, llo...@oreillyauto.com wrote:
>
> Is there a way to get a list of all the classes available from the puppet 
> master?
>
> I have 2 goals for this - one is documentation in a human readable form, 
> and the other is potentially importing that data into dashboard.
>
> I did find some info on the rest API (
> http://docs.puppetlabs.com/guides/rest_api.html#resource-types ) but I 
> can't make any sense of the output from it.
>
> Thanks.
>
> Lee
>

On Thursday, July 12, 2012 11:54:25 AM UTC-4, llo...@oreillyauto.com wrote:
>
> Is there a way to get a list of all the classes available from the puppet 
> master?
>
> I have 2 goals for this - one is documentation in a human readable form, 
> and the other is potentially importing that data into dashboard.
>
> I did find some info on the rest API (
> http://docs.puppetlabs.com/guides/rest_api.html#resource-types ) but I 
> can't make any sense of the output from it.
>
> Thanks.
>
> Lee
>

On Thursday, July 12, 2012 11:54:25 AM UTC-4, llo...@oreillyauto.com wrote:
>
> Is there a way to get a list of all the classes available from the puppet 
> master?
>
> I have 2 goals for this - one is documentation in a human readable form, 
> and the other is potentially importing that data into dashboard.
>
> I did find some info on the rest API (
> http://docs.puppetlabs.com/guides/rest_api.html#resource-types ) but I 
> can't make any sense of the output from it.
>
> Thanks.
>
> Lee
>

On Thursday, July 12, 2012 11:54:25 AM UTC-4, llo...@oreillyauto.com wrote:
>
> Is there a way to get a list of all the classes available from the puppet 
> master?
>
> I have 2 goals for this - one is documentation in a human readable form, 
> and the other is potentially importing that data into dashboard.
>
> I did find some info on the rest API (
> http://docs.puppetlabs.com/guides/rest_api.html#resource-types ) but I 
> can't make any sense of the output from it.
>
> Thanks.
>
> Lee
>

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

Reply via email to