Feature #10167

Add Puppet certname retrieval to Facter

Added by Alexandre Fouche 7 months ago. Updated 7 months ago.

Status:Closed Start date:10/19/2011
Priority:Normal Due date:
Assignee:- % Done:

0%

Category:-
Target version:-
Keywords:facter certname cloud provisioner Affected Facter version:1.6.2
Branch:
Votes: 0

Description

Context

I am using the cloud provisioner to bootstrap some ec2 nodes, and these clients are signed using a randomly generated certname, which is put in /etc/puppet.conf at the bootstrap time (eg certname = d7bcd693-73fd-495f-0876-ff91ea11111e).

But my puppet code repo also manages the puppet.conf file, so the file will be overwritten on the client at the first puppet run. Nevertheless, i should not lose what was the original certname for this client, because i need to insert it in the puppet.conf.erb that will be pushed to this client, otherwise the puppetmaster will not recognize and allow this client anymore.

i also queried the mailing list at http://groups.google.com/group/puppet-users/browse_thread/thread/81bf8df1f8ad723f

Feature request

Can Facter return the certname used by the puppet client, so that it can be used in erb templates ?

History

Updated by Ramin K 7 months ago

This already works, but it’s not through facter. When the Puppet agent runs it reads puppet.conf or /etc/{default|sysconfig}/puppet which will contain certname = mycertname which is then passed to the master as a fact. It is then availible to be used in templates.

Updated by Alexandre Fouche 7 months ago

Someone on the mailing list also told me there was the $clientcert variable

Updated by Alexandre Fouche 7 months ago

  • Status changed from Unreviewed to Closed

Also available in: Atom PDF