Skip to content

Latest commit

 

History

History
 
 

lab-16.1-Inventory-reports

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
 
 

Lab 16.1: Inventory reports

You can run tasks from the Puppet Enterprise console in order to perform actions on demand in your infrastructure. The facter_task task gathers inventory information about managed nodes by invoking facter. To get a full list of all facts known about a node, simply invoke facter_task against that node's name. In this exercise, you will use facter_task to gather inventory information about the classroom and display it in the PE console.

Remember that for security reasons, console users must have the "Run Tasks" permission in RBAC in order to run tasks from the console.

Steps

  1. Log in to the Puppet Enterprise console using your user credentials
  2. Under "RUN" in the left-hand navigation pane, click "Task"
  3. In the "Task" box, enter "facter_task"
  4. In the "Inventory" dropdown, select "Node Group"
  5. In the "Choose a node group" box, enter "All nodes" (production)
  6. Click "Select"
  7. A blue footer will appear. Click the "Run job" button in the footer.
  8. Return to the Tasks page. This time, select only the Puppet master by running a PQL query as follows:
    • In the "Task" box, enter "facter_task"
    • In the "Inventory" dropdown, select "PQL Query"
    • In the "Common queries" dropdown, select "Nodes with a specific resource"
    • Modify the query text to read resources[certname] { type = "Service" and title = "pe-puppetserver" }
    • Click "Submit query"
    • A blue footer will appear. Click the "Run job" button in the footer.

Expected Output

The output should be similar to this:

master.puppetlabs.vm          Start time: 2018-06-28 00:37 Z Run time: 00:00:36 Succeeded
{
  "staging_http_get" : "curl",
  "has_old_shiro_ini_default" : false,
  "path" : "/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin",
  "puppet_vardir" : "/opt/puppetlabs/puppet/cache",
  "identity" : {
    "gid" : 0,
    "uid" : 0,
    "user" : "root",
    "group" : "root",
    "privileged" : true
  },
<snip>

| Previous Lab | Next Lab |