Ask Your Question

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

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

mike.r gravatar image

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

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

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

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

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

mike.r gravatar image

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

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
[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

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


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

Seen: 64 times

Last updated: Apr 13 '16