| 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 |
}
|
|