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-3.16.0 modules/puppetdb_fact/plans/init.pp
bolt-3.15.0 modules/puppetdb_fact/plans/init.pp
bolt-3.14.1 modules/puppetdb_fact/plans/init.pp
bolt-3.13.0 modules/puppetdb_fact/plans/init.pp
bolt-3.12.0 modules/puppetdb_fact/plans/init.pp
bolt-3.11.0 modules/puppetdb_fact/plans/init.pp
bolt-3.10.0 modules/puppetdb_fact/plans/init.pp
bolt-3.9.2 modules/puppetdb_fact/plans/init.pp
bolt-3.9.1 modules/puppetdb_fact/plans/init.pp
bolt-3.9.0 modules/puppetdb_fact/plans/init.pp
bolt-3.8.1 modules/puppetdb_fact/plans/init.pp
bolt-3.8.0 modules/puppetdb_fact/plans/init.pp
bolt-3.7.1 modules/puppetdb_fact/plans/init.pp
bolt-3.7.0 modules/puppetdb_fact/plans/init.pp
bolt-3.6.1 modules/puppetdb_fact/plans/init.pp
bolt-3.6.0 modules/puppetdb_fact/plans/init.pp
bolt-3.5.0 modules/puppetdb_fact/plans/init.pp
bolt-3.4.0 modules/puppetdb_fact/plans/init.pp
bolt-3.3.0 modules/puppetdb_fact/plans/init.pp
bolt-3.1.0 modules/puppetdb_fact/plans/init.pp