Hello,
Excuse my naivety but I am having a large amount of trouble with external facts. I have seen that you need to create a folder called
/facts.d
to store external facts in. Inside my facts.d folder I have
/facts.d/install_location.sh
Now inside my install_location.sh I have the following:
#!/bin/bash
OUTPUT="$(/bin/rpm -qa --queryformat \'%{FILENAMES}\' pkg_jvmtop)"
echo "JVMTOP_HOME=${OUTPUT}"
I know you need to return things in a key/value pair like
key=value
Thus I am echoing
echo "JVMTOP_HOME=${OUTPUT}"
I am getting several errors when attempting
puppet apply /fact.d/install_location.sh
Can someone explain (in great detail) what I am doing wrong and how to reference JVMTOP_HOME in my manifests? I assume it is stupid, below are the errors I am getting:
Error: This Name has no effect. A value was produced and then forgotten (one or more preceding expressions may have the wrong form) at /etc/puppetlabs/code/environments/production/modules/jvmtop/facts.d/install_loc.sh:3:1
Error: Illegal attempt to assign to 'a Type-Name'. Not an assignable reference at /etc/puppetlabs/code/environments/production/modules/jvmtop/facts.d/install_loc.sh:2:1
Error: Found 2 errors. Giving up
↧