Paul schrieb: >> > define railsproject($name, $uid, $gid, $userpass, $sqlpass) { >> > mysql_database { "${name}_staging": ensure => present } >> > mysql_database { "${name}_production": ensure => present} >> > >> > ....more stuff... >> > } >> > Thanks all, it works. Is this documented or have you figured this out > by trial and error? I'm not trying to blame the docs, it's just that I > couldn't find anything about the ${} rule.
See http://reductivelabs.com/trac/puppet/wiki/LanguageTutorial#quoting > Apparently there seem to be more differences between classes and > defines wrt. scope. When I use template("foo.erb") inside a define() I > don't have direct access to facts or other variables (fex. the $name). > However scope.lookupvar('name') works. Is this expected behaviour? No. What version of puppet are you using? How did your ERB look like? Regards, DavidS -- dasz.at OG Tel: +43 (0)664 2602670 Web: http://dasz.at Klosterneuburg UID: ATU64260999 FB-Nr.: FN 309285 g FB-Gericht: LG Korneuburg --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---