I've added a PR https://github.com/puppetlabs/puppet/pull/7476 which provides the ability to compile a catalog for an arbitrary node with arbitrary facts (as YAML). It must be executed on the puppetserver host (or otherwise have access to the same environments, modules, manifests, hiera data, etc that puppetserver does). For example: compile catalog for the current node
$ bx puppet catalog compile |
bx puppet catalog compile |
Notice: Compiled catalog for localhost in environment production in 0.20 seconds |
{ |
"tags": [ |
"settings", |
"default", |
"node" |
], |
"name": "localhost", |
... |
}
|
compile catalog for a different node (pluto) using pre-generated facts
$ head pluto.yaml |
--- !ruby/object:Puppet::Node::Facts |
name: pluto |
values: |
puppetversion: 6.5.0 |
kernelversion: 18.2.0 |
$ bx puppet catalog compile --facts pluto.yaml --certname pluto |
Notice: Compiled catalog for pluto in environment production in 0.16 seconds |
{ |
"tags": [ |
"settings", |
"default", |
"node" |
], |
"name": "pluto", |
... |
}
|
|