Hi, Why not use cobbler external nodes feature to avoid all of this all together ? sounds to me that you should provision your nodes when they have a purpose if they don't have one, they should keep getting the default node.
I assumed that you have a snippet in cobbler that defines the RANDOM_STRING, maybe you could use the same way to actuly let cobbler define the puppet classes that needs to be included. if its not possible with cobbler, you might take a look at http://theforeman.org as far for your question, I think you need a custom fact. cheers, Ohad On Tue, Dec 1, 2009 at 5:34 AM, Miguel Armas <k...@canarytek.com> wrote: > Hi there! > I'm trying to use a default host entry as a catch-all for unconfigured > hosts, and I need to be able to read the client's certificate CN to > use it in my monitoring system. > > On these hosts I'm doing an unattended install with cobbler, in the > installation step I install puppet and configure it to run with the > option "--fqdn changeme-RANDOM_STRING" > Then I have this entry on my puppetmaster: > > # Default > node "default" { > $admindomain = "default" > #$modularit_name = "$hostname" > $modularit_name = "$name" > include modularit > } > > I need to setup the modularit_name variable to the > changeme-RANDOM_STRING y used in the command line. > It seems the --fqdn option only changes the name used for the > certificate and host entry lookup, but in the fqdn fact I still see > the clients hostname (uname -n) > > In the above default entry, if I use $hostname I get the client > hostname (I don't want to change the client's hostname for this to > work). If I use $name, y get "default". > > I know I could write a custom fact to read the certificate CN, but is > there a puppet variable that contains the clients certificate name? > > BTW, I also tried $certname, but it doesn't exist. > > I'm using version 0.24.8 on the puppetmaster and 0.24.4 (the ubuntu > package) on the client. Will it work with a newer version on the > client? > > Salu2! > -- > Miguel Armas <k...@canarytek.com> > CanaryTek Consultoria y Sistemas SL > ModularIT http://www.modularit.org/ > > -- > > You received this message because you are subscribed to the Google Groups > "Puppet Users" group. > To post to this group, send email to puppet-us...@googlegroups.com. > To unsubscribe from this group, send email to > puppet-users+unsubscr...@googlegroups.com<puppet-users%2bunsubscr...@googlegroups.com> > . > For more options, visit this group at > http://groups.google.com/group/puppet-users?hl=en. > > > -- You received this message because you are subscribed to the Google Groups "Puppet Users" group. To post to this group, send email to puppet-us...@googlegroups.com. To unsubscribe from this group, send email to puppet-users+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/puppet-users?hl=en.