[root@master201620-centos ~]# cat /etc/puppetlabs/facter/facts.d/test.sh
|
#!/bin/bash
|
|
echo "---
|
jeremy_info:
|
- is_fun
|
- is_nice" > /etc/puppetlabs/facter/facts.d/test.yaml
|
[root@master201620-centos ~]# cat /etc/puppetlabs/facter/facts.d/magic.sh
|
#!/bin/bash
|
echo "magic=$(facter -p jeremy_info --no-external-facts)"
|
|
[root@master201620-centos ~]# facter -p magic --debug
|
2016-06-08 23:45:50.112891 INFO puppetlabs.facter - executed with command line: -p magic --debug.
|
2016-06-08 23:45:50.409269 INFO leatherman.ruby:133 - ruby loaded from "/opt/puppetlabs/puppet/lib/libruby.so.2.1.0".
|
2016-06-08 23:45:50.792134 INFO leatherman.ruby:182 - using ruby version 2.1.9
|
2016-06-08 23:45:50.792222 INFO puppetlabs.facter - requested queries: magic.
|
2016-06-08 23:45:50.792352 DEBUG puppetlabs.facter - fact "facterversion" has resolved to "3.2.0".
|
2016-06-08 23:45:50.792406 DEBUG puppetlabs.facter - fact "aio_agent_version" has resolved to "1.5.1.20".
|
2016-06-08 23:45:50.792753 DEBUG puppetlabs.facter - searching "/opt/puppetlabs/facter/facts.d" for external facts.
|
2016-06-08 23:45:50.792870 DEBUG puppetlabs.facter - skipping external facts for "/etc/facter/facts.d": No such file or directory
|
2016-06-08 23:45:50.792923 DEBUG puppetlabs.facter - searching "/etc/puppetlabs/facter/facts.d" for external facts.
|
2016-06-08 23:45:50.792990 DEBUG puppetlabs.facter - checking execution on /etc/puppetlabs/facter/facts.d/test.sh
|
2016-06-08 23:45:50.793046 DEBUG puppetlabs.facter - resolving facts from executable file "/etc/puppetlabs/facter/facts.d/test.sh".
|
2016-06-08 23:45:50.793202 DEBUG leatherman.execution:88 - executing command: /etc/puppetlabs/facter/facts.d/test.sh
|
2016-06-08 23:45:51.104426 DEBUG leatherman.execution:555 - process exited with status code 0.
|
2016-06-08 23:45:51.104671 DEBUG puppetlabs.facter - completed resolving facts from executable file "/etc/puppetlabs/facter/facts.d/test.sh".
|
2016-06-08 23:45:51.104795 DEBUG puppetlabs.facter - resolving facts from YAML file "/etc/puppetlabs/facter/facts.d/test.yaml".
|
2016-06-08 23:45:51.139706 DEBUG puppetlabs.facter - fact "jeremy_info" has resolved to [
|
"is_fun",
|
"is_nice"
|
].
|
2016-06-08 23:45:51.139778 DEBUG puppetlabs.facter - completed resolving facts from YAML file "/etc/puppetlabs/facter/facts.d/test.yaml".
|
2016-06-08 23:45:51.139839 DEBUG puppetlabs.facter - checking execution on /etc/puppetlabs/facter/facts.d/magic.sh
|
2016-06-08 23:45:51.139921 DEBUG puppetlabs.facter - resolving facts from executable file "/etc/puppetlabs/facter/facts.d/magic.sh".
|
2016-06-08 23:45:51.139971 DEBUG leatherman.execution:88 - executing command: /etc/puppetlabs/facter/facts.d/magic.sh
|