Matthias Saou wrote : > > try $name, that should do it, came in somewhere mid 2.6.x series > > Yup, that was it! > > Section "$name can now be used to set default values in defined > resource types" in the release notes : > https://projects.puppetlabs.com/projects/puppet/wiki/Release_Notes
Maybe I'm asking for too much, but is the same thing achievable when calling a definition? I've tried with $name but it takes the value of the parent element. Basically what I'd like to do is : node 'myvmhost' { createvm { [ 'vm01', 'vm02', 'vm03', 'vm04', 'vm05' ]: # VNC Port 59XY for vmXY vncport => regsubst($name, 'vm', '59'), } } For two reasons : * This prevents from iterating many identical calls to the definition * The definition is in a generic module for which it does not make sense to default the parameter to this calculated value. With $name I get the 'myvmhost' string using puppet 2.6.9, but I'd like to have access to the 'vmXY' string instead. Is that possible? Matthias -- Clean custom Red Hat Linux rpm packages : http://freshrpms.net/ Fedora release 14 (Laughlin) - Linux kernel 2.6.35.13-91.fc14.x86_64 Load : 0.21 0.22 0.27 -- You received this message because you are subscribed to the Google Groups "Puppet Users" group. To post to this group, send email to puppet-users@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.