Skip to content

Error while resolving custom fact fact='puppetdb_version' #413

Description

@damluk

Debian 12, Puppetserver 7.9.5, PuppetDB 7.12.1.

Error: Facter: Error while resolving custom fact fact='puppetdb_version', resolution='<anonymous>': undefined method `strip' for nil:NilClass

    output.split(':').last.strip
setcode do
  output = Facter::Core::Execution.execute('puppetdb --version')
  output.split(':').last.strip                                                                                                                                                                                                                                                                      
end
$ /usr/sbin/puppetdb --version
Available subcommands:
  version                 Display version information
  services                Run PuppetDB
  upgrade                 Upgrade to latest version and exit
  benchmark               Run development-only benchmarking tool
  fact-storage-benchmark
  help                    Display usage summary
For help on a given subcommand, invoke it with -h

$ /usr/sbin/puppetdb version
version=7.12.1
target_schema_version=80

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions