Details
-
New Feature
-
Status: Accepted
-
Normal
-
Resolution: Unresolved
-
None
-
None
-
None
-
Coremunity
-
3
Description
As I discussed with henrik.lindberg, I'd like an option to get JSON (and perhaps YAML) output from the puppet resource command. I can see two use cases:
1) For YAML, ability to go directly from existing puppet resources to YAML entries I can put into hiera to feed into create_resource
2) for JSON, as an extension point to use puppet in the context of shell scripts, python fabric scripts, etc. For example, using the puppetlabs-aws module, you could loop over the output of a puppet resource command listing all ec2_instances, use jq in bash (or python json parsing, etc) to select instances that lack appropriate tags, modify the JSON to add the appropriate tags, then feed that back into puppet apply to update the resources.
Ideally, I'd like some ability to pipe JSON into a puppet resource to set parameters, as well, but that's less important because I can use puppet functions in a puppet apply.
Attachments
Issue Links
- is blocked by
-
PUP-7808 puppet resource <...> --to_yaml mishandles structured resource values
-
- Resolved
-