Jira (BOLT-1431) Consider using Gem facter in facts task

2 views
Skip to first unread message

Cas Donoghue (JIRA)

unread,
Jun 26, 2019, 2:36:03 PM6/26/19
to puppe...@googlegroups.com
Cas Donoghue created an issue
 
Puppet Task Runner / New Feature BOLT-1431
Consider using Gem facter in facts task
Issue Type: New Feature New Feature
Assignee: Unassigned
Created: 2019/06/26 11:35 AM
Priority: Normal Normal
Reporter: Cas Donoghue

Currently when executing the facts task on the "special" localhost target on a clean install results in an error like:

cas@cas-ThinkPad-T460p:~/working_dir$ docker run puppet-bolt task run facts -t localhost
Started on localhost...
Failed on localhost:
  The task failed with exit code 1:
  /opt/puppetlabs/bolt/lib/ruby/2.5.0/open3.rb:199:in `spawn': No such file or directory - facter (Errno::ENOENT)
      from /opt/puppetlabs/bolt/lib/ruby/2.5.0/open3.rb:199:in `popen_run'
      from /opt/puppetlabs/bolt/lib/ruby/2.5.0/open3.rb:95:in `popen3'
      from /opt/puppetlabs/bolt/lib/ruby/2.5.0/open3.rb:258:in `capture3'
      from /tmp/053a50dc-7228-4ea7-8420-cee1cf145d7e/ruby.rb:41:in `<main>'
 
  {
  }
Failed on 1 node: localhost
Ran on 1 node in 0.14 seconds

We should update the logic that determines the facter executable to use to also consider the gem version of facter we ship with bolt packages. Will need to figure out the precedence order. Maybe something like:
1. `opt/puppetlabs/puppet/bin/facter` (and windows equivalent)
2. `/opt/puppetlabs/bolt/bin/facter` (available in bolt packages, and windows equiv)
3. just call `facter` and see if its on the path?

Add Comment Add Comment
 
This message was sent by Atlassian JIRA (v7.7.1#77002-sha1:e75ca93)
Atlassian logo
Reply all
Reply to author
Forward
0 new messages