Ask Your Question
0

Win7 puppet agent tries to run "/usr/local/bin/puppet config print certname"

asked 2016-04-08 07:59:22 -0600

mike.r gravatar image

updated 2016-04-08 08:00:47 -0600

agent version 4.4.1

running 'puppet agent -t' from cmd prompt

C:\Windows\System32>puppet agent -t
Info: Using configured environment 'production'
Info: Retrieving pluginfacts
Info: Retrieving plugin
Info: Loading facts
**Error: Facter: error while resolving custom fact "certname": No such file or dir
ectory - /usr/local/bin/puppet config print certname**

Info: Caching catalog for mrx7pc
Info: Applying configuration version '1460120244'

why is it looking at /usr/local/bin?

edit retag flag offensive close merge delete

2 Answers

Sort by ยป oldest newest most voted
1

answered 2016-04-11 11:42:13 -0600

joshc gravatar image

This is coming from a custom fact in a module you are using. Try running with --debug --trace to see if you can narrow it down. You can also grep for 'config print certname' in your production environment directory on the master, e.g.

$ sudo find /etc/puppetlabs/code/environments/production -type f -exec grep 'config print certname' {} \; -print.

edit flag offensive delete link more
0

answered 2016-04-13 11:16:55 -0600

mike.r gravatar image

updated 2016-04-13 11:18:35 -0600

Yes, you are correct, this was the problem. Thanks!

[root@puppetmaster3 ssh]# find /etc/puppetlabs/code/environments/production -type f -exec grep 'config print certname' {} \; -print
    %x[/usr/local/bin/puppet config print certname].chomp
/etc/puppetlabs/code/environments/production/modules/puppet_tests/lib/facter/certname.rb
[root@puppetmaster3 ssh]# cat /etc/puppetlabs/code/environments/production/modules/puppet_tests/lib/facter/certname.rb
# Fact: certname
#
Facter.add('certname') do
  setcode do
    %x[/usr/local/bin/puppet config print certname].chomp
  end
end

didnt add the kernel confine line to the fact ruby. Derp!!

edit flag offensive delete link more

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Question Tools

1 follower

Stats

Asked: 2016-04-08 07:59:22 -0600

Seen: 72 times

Last updated: Apr 13 '16