Jira (PUP-10608) Option to "prettyprint" /opt/puppetlabs/puppet/cache/client_data/catalog

5 views
Skip to first unread message

Josh Cooper (Jira)

unread,
Aug 5, 2020, 3:26:04 PM8/5/20
to puppe...@googlegroups.com
Josh Cooper moved an issue
 
Puppet / New Feature PUP-10608
Option to "prettyprint" /opt/puppetlabs/puppet/cache/client_data/catalog
Change By: Josh Cooper
Key: PA PUP - 3353 10608
Project: Puppet Agent
Add Comment Add Comment
 
This message was sent by Atlassian Jira (v8.5.2#805002-sha1:a66f935)
Atlassian logo

Josh Cooper (Jira)

unread,
Aug 5, 2020, 3:39:03 PM8/5/20
to puppe...@googlegroups.com
Josh Cooper commented on New Feature PUP-10608
 
Re: Option to "prettyprint" /opt/puppetlabs/puppet/cache/client_data/catalog

Moved to PUP project.

I'm thinking this is handled better on the CLI for example using jq or python -m json.tool:

# cat /opt/puppetlabs/puppet/cache/client_data/catalog/localhost.json | jq .
{
  "tags": [
    "settings"
  ],
  "name": "localhost",
  "version": 1596643882,
  "code_id": null,
  "catalog_uuid": "deaa2a21-2cf6-43a4-9785-a84333353941",
  "catalog_format": 1,
  "environment": "production",
  ..
}

For example, you're probably interested in specific resources, and jq is good for filtering/selecting:

# cat /opt/puppetlabs/puppet/cache/client_data/catalog/localhost.json | jq '.resources[] | select(.type | contains("Notify"))'
{
  "type": "Notify",
  "title": "hello",
  "tags": [
    "notify",
    "hello",
    "class"
  ],
  "file": "/etc/puppetlabs/code/environments/production/manifests/site.pp",
  "line": 1,
  "exported": false
}

Pat Riehecky (Jira)

unread,
Sep 11, 2020, 4:29:03 PM9/11/20
to puppe...@googlegroups.com
Pat Riehecky commented on New Feature PUP-10608

That makes sense to me, I'd say this can be canceled.

Reply all
Reply to author
Forward
0 new messages