On Tuesday, October 23, 2012 9:37:29 AM UTC-5, Johnathan Phan
wrote:>
> Hi everyone,
>
> My puppet master version is 2.7.6. The client runs on 2.6.17.
>
> the clients hostname is java1.test.example.com.
>
Does the client agree with you about that?
>
> I have used the following guide to setup resolv.conf properties.
>
> http://projects.puppetlabs.com/projects/1/wiki/resolv_conf_patterns
>
> I have setup the following record in nodes.pp
>
> node /\.test\.example\.com/ {import "resolv" resolv_conf { "
> test.example.com":
> domainname => "",
> searchpath => [''test.example.com''],
> nameservers => [''192.168.2.1'',
''192.168.2.2''],
> }
> }
>
> I have tried the following regex combination for the declaration of the
> node.
>
> /java[0-9].test\.example\.com/
> /.*\.test\.example\.com/
> /(.*)\.test\.example\.com/
> /java1|java2\.test\.example\.com/
>
> None of these references will activate when running puppetd -tv on the
> host target machine.
>
> I want to use regex to make sure all the servers under test.example.comget
this special resolv.conf properties. However it''s not working. regex in
> any shape or form works. I checked puppet versions and regex was added in
> 2.5. so I am not sure how to troubleshoot this further.
>
> does anyone know of any tests I can do to find out what is wrong?
>
>
Clients are matched to node blocks based on the certnames on the X.509
certificates with which they authenticate themselves to the master. By
default, the agent uses the hostname as the certname when it generates
client certificates, but it can be induced to use a different certname. If
you set everything up yourself and none of that rings a bell for you, then
you probably don''t need to worry about it. If you are using certnames
that
differ from nodes'' hostnames, however, then you''ll need to
take a different
approach to identifying which nodes need your custom resolver config.
As for tests, you can get a lot of information by running the agent with
the --debug flag. You can also run ''facter -p'' from the
command line to
see the node facts (including $hostname) that the client will send to the
master. You can also declare Notify resources at various places (including
outside any node block) to ascertain what declarations Puppet parses for
your node, and to check what fact values the master sees.
John
--
You received this message because you are subscribed to the Google Groups
"Puppet Users" group.
To view this discussion on the web visit
https://groups.google.com/d/msg/puppet-users/-/MBW41999KRAJ.
To post to this group, send email to puppet-users@googlegroups.com.
To unsubscribe from this group, send email to
puppet-users+unsubscribe@googlegroups.com.
For more options, visit this group at
http://groups.google.com/group/puppet-users?hl=en.