How to find version of an application on nodes

40 views
Skip to first unread message

Brandon Blackmoor

unread,
Jan 29, 2018, 5:17:56 AM1/29/18
to Puppet Users
I apologize if this is a stupid question, but I am still a novice at Puppet. I have been asked if it is possible to use Puppet to find out if an application (apparmor, specifically) is installed on our various nodes (Ubuntu servers, specifically). The nodes are all running puppet agent and so on. We're currently running Puppet v2016.4.0.

Feel free to point me to existing documentation. I did search first, but my search results either seemed irrelevant or involved way more than what I am actually asking for. I'm not looking to write a new module, for example.

Thank you for any help or guidance you can offer.

Martin Alfke

unread,
Jan 29, 2018, 5:29:52 AM1/29/18
to puppet...@googlegroups.com
Hi Brandon,

> On 25. Jan 2018, at 23:17, Brandon Blackmoor <bblac...@blackgate.net> wrote:
>
> I apologize if this is a stupid question, but I am still a novice at Puppet. I have been asked if it is possible to use Puppet to find out if an application (apparmor, specifically) is installed on our various nodes (Ubuntu servers, specifically). The nodes are all running puppet agent and so on. We're currently running Puppet v2016.4.0.

PE offers the package inventory (https://puppet.com/docs/pe/2017.3/inspecting_infrastructure/viewing_packages_in_use.html).
This only shows you installed rpm, dpkg, gem packages.

hth,

Martin

>
> Feel free to point me to existing documentation. I did search first, but my search results either seemed irrelevant or involved way more than what I am actually asking for. I'm not looking to write a new module, for example.
>
> Thank you for any help or guidance you can offer.
>
>
> --
> 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/de967d90-53e8-4b7b-83bd-93592cc45a2d%40googlegroups.com.
> For more options, visit https://groups.google.com/d/optout.

Jochen Haeberle

unread,
Jan 29, 2018, 8:55:19 AM1/29/18
to puppet...@googlegroups.com
Hi,

You could create a simple facter script to check for a installed software you are interested in.

The facter scripts are run on all nodes and you can check the result on each machine easily.

regards

jcbollinger

unread,
Jan 29, 2018, 8:55:36 AM1/29/18
to Puppet Users


On Monday, January 29, 2018 at 4:17:56 AM UTC-6, Brandon Blackmoor wrote:
I apologize if this is a stupid question, but I am still a novice at Puppet. I have been asked if it is possible to use Puppet to find out if an application (apparmor, specifically) is installed on our various nodes (Ubuntu servers, specifically). The nodes are all running puppet agent and so on. We're currently running Puppet v2016.4.0.

Feel free to point me to existing documentation. I did search first, but my search results either seemed irrelevant or involved way more than what I am actually asking for. I'm not looking to write a new module, for example.


If you're not using PE, or if the package inventory doesn't meet your needs, then you always have the alternative of writing a custom fact. This will be distributed automatically to nodes, which will evaluate the fact when they make a catalog request, providing the result among all the other fact values.  These will then be recorded in PuppetDB, from which you can query the results, and the values will be available during catalog building as top-scope variables.

John

Brandon Blackmoor

unread,
Jan 29, 2018, 9:22:49 AM1/29/18
to Puppet Users
We are using Puppet Enterprise, and it looks like the Packages screen may be just what I need.

Unfortunately, it does not appear to be available in Puppet 2016.4.0, which is what we are currently using. I will investigate upgrading our installation.

Thank you.

Rob Nelson

unread,
Jan 29, 2018, 9:38:23 AM1/29/18
to puppet...@googlegroups.com
Every installation is different, of course, but I found the upgrade process from 2016.4.3 to 2017.3.2 to be remarkably easy, even by the standards of PE upgrades. The docs pre-flight checklist covered everything, it's worth looking into. Just note that the package collection is not on by default and you will need to enable it afterward.
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/911583f9-1fe9-471d-8027-5b03f61bf5f0%40googlegroups.com.

Brandon Blackmoor

unread,
Jan 30, 2018, 1:00:07 PM1/30/18
to Puppet Users
We've upgraded the Puppet master, and are working on the Puppet agents now.

Out of curiosity, is there an example facter script of the type people have mentioned here? I think that would be a useful thing to have on hand.
Reply all
Reply to author
Forward
0 new messages