Quantcast
Channel: Ask Puppet: Puppet DevOps Q&A Community - RSS feed
Viewing all articles
Browse latest Browse all 6104

Question on custom fact

$
0
0
Hi, I am trying to get my first custom fact working. My custom fact executes a shell script to get the value and returns a string. Code is : Facter.add(':ora_psu_num') do setcode do Facter::Core::Execution.exec('/oraback01/sw/scripts/get_oracle_psu_num.ksh') end end To test it I set env variable $FACTERLIB to include my custom facter code and query facter :ora_psu_num and I get the expected result 17478514,18031668,18522509,19121551,19769489,20299013,20760982,21352635,21948347 However, When I try to get it from puppet code it is not returning any value: Code is: $foo=$::ora_psu_num notify {"$foo":} Error: puppet apply test_facter.pp Could not retrieve fact='package_provider', resolution='': Malformed version number string 3.7.4 (Puppet Enterprise 3.7.2) Notice: Compiled catalog for uora1008n.bsc.bscal.com in environment production in 0.02 seconds Notice: Notice: /Stage[main]/Main/Notify[]/message: defined 'message' as '' Notice: Finished catalog run in 0.11 seconds Error: Failed to apply catalog: No title provided and "Notify[]" is not a valid resource reference What am I doing wrong? Advice.

Viewing all articles
Browse latest Browse all 6104


<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>