How to access puppet resources?

Hi there,
I recently started using Foreman for managing Windows 7 endpoints and a few
Linux clients. When I enter e.g.
puppet resource package
on the command line of a client with a present puppet installation, I am
able to obtain a list of all installed packages on that system, including
the version number. How can I access this data within Foreman centrally?
And how can I enable, that this information is in some kind "cached" on the
server if a client is offline?

Thank you very much for advice!

Julia

Hi Julia,

> When I enter e.g.
> puppet resource package
> on the command line of a client with a present puppet installation, I am able to obtain a list of all installed packages on that system, including the version number. How can I access this data within Foreman centrally? And how can I enable, that this information is in some kind "cached" on the server if a client is offline?

In the web UI this information is available at:

Hosts -> Content Hosts -> <select your host> -> "Packages" tab

You can also grab this data via the API using:

GET /api/hosts/:host_id/packages

Regards,

j

You could create a fact that's distributed via Puppet. Using Facter's
external facts support, this can be a script that's executed on each
Puppet run and then the value of the fact will be stored in Foreman. The
result won't be very easy to read, but it may suffice.

https://docs.puppet.com/facter/3.5/custom_facts.html#external-facts has
more information on creating external facts. If it's in the modulepath
then it will be downloaded automatically by the Puppet agents.

··· On 20/12/16 11:25, jul1a.berger@t-online.de wrote: > Hi there, > I recently started using Foreman for managing Windows 7 endpoints and a > few Linux clients. When I enter e.g. > puppet resource package > on the command line of a client with a present puppet installation, I am > able to obtain a list of all installed packages on that system, > including the version number. How can I access this data within Foreman > centrally? And how can I enable, that this information is in some kind > "cached" on the server if a client is offline?


Dominic Cleal
dominic@cleal.org

Hi Jason,
thank you for your quick response.

>
> In the web UI this information is available at:
>
> Hosts -> Content Hosts -> <select your host> -> "Packages" tab
>
>
But aren't Content Hosts only available if the Katello plugin is installed
and if the "Subscription Manager" is installed on the client? Is there no
possibility to get this information without an additional installation
(except of the puppet client) on the host which should be monitored? And if
not, how can I handle Windows Clients? As far as I know, the Katello Client
is not available for Windows Systems or did I miss something?

Thank you!

Julia

Hi Julia,

I'm sorry, I made too many assumptions about your setup. I don't know how to get the data you're looking for in this case.

Regards,

j

··· From: "jul1a berger" To: "Foreman users" Cc: "Jason Nance" Sent: Tuesday, December 20, 2016 1:10:14 PM Subject: Re: [foreman-users] How to access puppet resources?

Hi Jason,
thank you for your quick response.

In the web UI this information is available at:

Hosts -> Content Hosts -> -> “Packages” tab

But aren’t Content Hosts only available if the Katello plugin is installed and if the “Subscription Manager” is installed on the client? Is there no possibility to get this information without an additional installation (except of the puppet client) on the host which should be monitored? And if not, how can I handle Windows Clients? As far as I know, the Katello Client is not available for Windows Systems or did I miss something?

Thank you!

Julia