Using backreferences from node name regex match

58 views
Skip to first unread message

Guy Knights

unread,
Apr 26, 2012, 7:38:52 PM4/26/12
to puppet...@googlegroups.com
I appears that backreferences when using regexes in node names doesn't work. Can anyone confirm this? If I'm incorrect, how do I go about using a backreference to the name regex within the node definition container?

Thanks,
Guy

Nick Fagerlund

unread,
Apr 26, 2012, 9:00:24 PM4/26/12
to Puppet Users
Yeah, I'm pretty sure that's not supported.

But you could implement whatever you're trying to do with a regular
regex match, if you need to. Use the built-in $clientcert variable,
which contains the node's certname.

(This assumes you're doing the default behavior of using the certname
as the node name. Hint: you almost certainly are.)

Guy Knights

unread,
Apr 30, 2012, 1:52:40 PM4/30/12
to puppet...@googlegroups.com
Ok, thanks Nick. I'll look into using a regex match on the client cert (and yes, you're right. I am :)
Reply all
Reply to author
Forward
0 new messages