Hi Felix, Actually, it will not apply to each client. Each of my clients knows what role it plays. That is set in a facter variable ($osp_type) on the client. So, the entire code block looks like this...
case $osp_type { adm: { node "${fqdn}" { include adm } } ing: { node "${fqdn}" { include ing } } rep: { node "${fqdn}" { include rep } } oss: { node "${fqdn}" { include oss } } mds: { node "${fqdn}" { include mds } } default: { notice("Could not resolve role for ${fqdn}") } } I am applying the appropriate class to apply based on the role. rjl On Dec 20, 9:32 am, Felix Frank <felix.fr...@alumni.tu-berlin.de> wrote: > On 12/20/2010 05:23 PM, rjl wrote: > > > Hi all, > > I am having an issue with the syntax for a node definition. I want to > > use a facter variable in my definition but I get a syntax error. Here > > is the code > > > node "${fqdn}" { include adm } > > > Here is the error. > > > Could not parse for environment production: Syntax error at ''; > > expected '}' at /etc/puppet/manifests/nodes.pp:16 > > > I test to make sure that ${fqdn} is set before defining the node. I > > have used static strings and regexes and they all work but, for some > > reason, the variable will not be expanded. > > Hi, > > what are you trying to solve? Seeing as this node definition will apply > to each and every client, you can as well put that include to the > general scope (outside any node). > > Is that line 16 you posted there? Because that error seems weird to me. > > Regards, > Felix -- 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.