Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- Begin tests/external_facts/structured_executable_facts.rb
- executable external facts can return structured data
- j9u4iawal8vmjbv.delivery.puppetlabs.net (centos7-64-1) 09:21:52$ facter kernelmajversion
- 3.10
- j9u4iawal8vmjbv.delivery.puppetlabs.net (centos7-64-1) executed in 0.08 seconds
- * Agent j9u4iawal8vmjbv.delivery.puppetlabs.net: setup default external facts directory (facts.d)
- j9u4iawal8vmjbv.delivery.puppetlabs.net (centos7-64-1) 09:21:52$ mkdir -p '/opt/puppetlabs/facter/facts.d'
- j9u4iawal8vmjbv.delivery.puppetlabs.net (centos7-64-1) executed in 0.03 seconds
- * Agent j9u4iawal8vmjbv.delivery.puppetlabs.net: create an executable yaml fact in default facts.d
- localhost $ scp /var/folders/3r/k7hzxdmn0ps9bdqd623lpcmh0000gq/T/beaker20161020-62731-1yvn2yr centos7-64-1:/opt/puppetlabs/facter/facts.d/yaml_fact.sh {:ignore => }
- j9u4iawal8vmjbv.delivery.puppetlabs.net (centos7-64-1) 09:21:52$ chmod +x '/opt/puppetlabs/facter/facts.d/yaml_fact.sh'
- j9u4iawal8vmjbv.delivery.puppetlabs.net (centos7-64-1) executed in 0.02 seconds
- * YAML output should produce a structured fact
- j9u4iawal8vmjbv.delivery.puppetlabs.net (centos7-64-1) 09:21:52$ facter yaml_fact
- [
- "one",
- "two",
- "three"
- ]
- j9u4iawal8vmjbv.delivery.puppetlabs.net (centos7-64-1) executed in 0.07 seconds
- * Agent j9u4iawal8vmjbv.delivery.puppetlabs.net: create an executable json fact in default facts.d
- localhost $ scp /var/folders/3r/k7hzxdmn0ps9bdqd623lpcmh0000gq/T/beaker20161020-62731-4w4fyh centos7-64-1:/opt/puppetlabs/facter/facts.d/json_fact.sh {:ignore => }
- j9u4iawal8vmjbv.delivery.puppetlabs.net (centos7-64-1) 09:21:53$ chmod +x '/opt/puppetlabs/facter/facts.d/json_fact.sh'
- j9u4iawal8vmjbv.delivery.puppetlabs.net (centos7-64-1) executed in 0.06 seconds
- * JSON output should produce a structured fact
- j9u4iawal8vmjbv.delivery.puppetlabs.net (centos7-64-1) 09:21:53$ facter json_fact
- {
- element => 1
- }
- j9u4iawal8vmjbv.delivery.puppetlabs.net (centos7-64-1) executed in 0.07 seconds
- * Agent j9u4iawal8vmjbv.delivery.puppetlabs.net: create an executable key-value fact in default facts.d
- localhost $ scp /var/folders/3r/k7hzxdmn0ps9bdqd623lpcmh0000gq/T/beaker20161020-62731-1tgcs0d centos7-64-1:/opt/puppetlabs/facter/facts.d/kv_fact.sh {:ignore => }
- j9u4iawal8vmjbv.delivery.puppetlabs.net (centos7-64-1) 09:21:53$ chmod +x '/opt/puppetlabs/facter/facts.d/kv_fact.sh'
- j9u4iawal8vmjbv.delivery.puppetlabs.net (centos7-64-1) executed in 0.02 seconds
- * output that is neither yaml nor json should not produce a structured fact
- j9u4iawal8vmjbv.delivery.puppetlabs.net (centos7-64-1) 09:21:53$ facter kv_fact
- one
- j9u4iawal8vmjbv.delivery.puppetlabs.net (centos7-64-1) executed in 0.07 seconds
- Begin teardown
- j9u4iawal8vmjbv.delivery.puppetlabs.net (centos7-64-1) 09:21:53$ rm -rf '/opt/puppetlabs/facter/facts.d'
- j9u4iawal8vmjbv.delivery.puppetlabs.net (centos7-64-1) executed in 0.02 seconds
- End teardown
- tests/external_facts/structured_executable_facts.rb passed in 0.70 seconds
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement