Open chambersmp opened 2 years ago
Try using the command puppet facts find --terminus puppetdb <certname>
.
If you are using one of the latest agents, since the release of version 7, the default action for puppet facts is "puppet facts show" which displays the current node's facts. That's the reason for the empty factsets when passing the certname as a parameter.
Issue
The instructions to generate a node's factset on the Puppet primary server do not seem to work for Puppet Enterprise version 2021.4.x.
Provided Example: puppet facts --terminus puppetdb \<node certname> > fact_set_name.json
This command results in an empty factset containing only the node's certname as a key with null value.
Recommendation
The resultant factset output requires a minor edit to change the 'facts' key to 'values' to allow onceover processing. The next recommendation suggests updating the onceover > control-repo class to accept the facts key as an alternative to avoid editing the output.
ref: onceover/lib/onceover/controlrepo.rb
This should then support factsets like the ones below:
values hash { "certname": "\<example-certname.foo.bar>", "environment": "production", "values": { "agent_specified_environment": "production", "aio_agent_build": "6.25.1", "aio_agent_version": "6.25.1", "architecture": "x86_64", "augeas": { "version": "1.12.0" }, ... }
facts hash { "certname": "\<example-certname.foo.bar>", "environment": "production", "facts": { "agent_specified_environment": "production", "aio_agent_build": "6.25.1", "aio_agent_version": "6.25.1", "architecture": "x86_64", "augeas": { "version": "1.12.0" }, ... } root facts { "certname": "\<example-certname.foo.bar>", "environment": "production", "agent_specified_environment": "production", "aio_agent_build": "6.25.1", "aio_agent_version": "6.25.1", "architecture": "x86_64", "augeas": { "version": "1.12.0" ... }