Puppet Version: 5.4.0 Puppet Server Version: n/a OS Name/Version: Ubuntu 16.04 It would be very useful if "puppet lookup allowed specify facts as direct arguments a parameter. When automating something that uses "puppet lookup", having to write a temporary file containing some facts, then deleting the file afterwards is a pain, and is potentially fragile. If the facts could be specified directly, there would be no need for the file. Desired Behavior:
/opt/puppetlabs/bin/puppet lookup site_domain --environment boo --facts test_facts.yaml --node myhost.r00.zone1.foo.bar.com --node_terminus=plain --external_nodes=none --fact boo=test --fact test=boo --fact asdfasd=123 |
~~~8<~~~ |
$ echo $? |
0 |
Actual Behavior:
/opt/puppetlabs/bin/puppet lookup site_domain --environment boo --facts test_facts.yaml --node myhost.r00.zone1.foo.bar.com --node_terminus=plain --external_nodes=none --fact boo=test --fact test=boo --fact asdfasd=123 |
Error: Could not parse application options: invalid option: --fact |
$ echo $? |
130
|
I've attached a patch which basically works, but I'm not very familiar with the code base, and so there's probably some style and other functional things I'm not considering. I'd be happy to create a PR, but let's see the patch is even close first Thanks. |