Sha256: b1af703f439569381c211417a2f9377d51d5478064ebb52f866d4e35e8b2feb2

Contents?: true

Size: 672 Bytes

Versions: 42

Compression:

Stored size: 672 Bytes

Contents

# @summary
#   Collect facts for the specified targets from PuppetDB and store them
#   on the Targets.
#
# This plan accepts a list of targets to collect facts for from the configured
# PuppetDB connection. After collecting facts, they are stored on each target's
# Target object. The updated facts can then be accessed using `$target.facts`.
#
# @param targets
#   The targets to collect facts for.
plan puppetdb_fact(TargetSpec $targets) {
  $targs = get_targets($targets)
  $certnames = $targs.map |$target| { $target.host }
  $pdb_facts = puppetdb_fact($certnames)
  $targs.each |$target| {
    add_facts($target, $pdb_facts[$target.host])
  }

  return $pdb_facts
}

Version data entries

42 entries across 42 versions & 1 rubygems

Version Path
bolt-4.0.0 modules/puppetdb_fact/plans/init.pp
bolt-3.29.0 modules/puppetdb_fact/plans/init.pp
bolt-3.28.0 modules/puppetdb_fact/plans/init.pp
bolt-3.27.4 modules/puppetdb_fact/plans/init.pp
bolt-3.27.2 modules/puppetdb_fact/plans/init.pp
bolt-3.27.1 modules/puppetdb_fact/plans/init.pp
bolt-3.26.2 modules/puppetdb_fact/plans/init.pp
bolt-3.26.1 modules/puppetdb_fact/plans/init.pp
bolt-3.25.0 modules/puppetdb_fact/plans/init.pp
bolt-3.24.0 modules/puppetdb_fact/plans/init.pp
bolt-3.23.1 modules/puppetdb_fact/plans/init.pp
bolt-3.23.0 modules/puppetdb_fact/plans/init.pp
bolt-3.22.1 modules/puppetdb_fact/plans/init.pp
bolt-3.22.0 modules/puppetdb_fact/plans/init.pp
bolt-3.21.0 modules/puppetdb_fact/plans/init.pp
bolt-3.20.0 modules/puppetdb_fact/plans/init.pp
bolt-3.19.0 modules/puppetdb_fact/plans/init.pp
bolt-3.18.0 modules/puppetdb_fact/plans/init.pp
bolt-3.17.0 modules/puppetdb_fact/plans/init.pp
bolt-3.16.1 modules/puppetdb_fact/plans/init.pp