Issue #2680 has been updated by Brad Krane. Status changed from Needs more information to Closed
Luke, so I did some more poking around apparently the problem was caused by something unrelated and it just happened to be fixed when I applied the patch I mentioned earlier. Sorry for the trouble, but everything works as it should. ---------------------------------------- Bug #2680: Template Content in Inherited Class Resource http://projects.reductivelabs.com/issues/2680 Author: Brad Krane Status: Closed Priority: Normal Assigned to: Category: parser Target version: Affected version: 0.24.8 Keywords: template overload Branch: Hi, I have discovered an odd behavior of the content generation of the template function in an inherited class with an overloaded variable. For example: <pre> class webapp { $dbname = "webapp" file{ "config.php": content => template("webapp/config.php.erb") } } class dev-webapp inherits webapp { $dbname = "dev-webapp" File["config.php"] { content => template("webapp/config.php.erb") } } </pre> where config.php.erb contains: <pre> database = <%= dbname %> </pre> I would expect that content of the dev-webapp version of config.php to be "database = dev-webapp" however it is "database = webapp" as if the value of $dbname was never changed from the base class. In order to get the output I would expect I have to declare the child class as follows: <pre> class dev-webapp inherits webapp { $dbname = "dev-webapp" $filecontent = template("webapp/config.php.erb") File["config.php"] { content => $filecontent } } </pre> To me it seems that the two different versions of the dev-webapp class should yield the same output for the content. -- You have received this notification because you have either subscribed to it, or are involved in it. To change your notification preferences, please click here: http://reductivelabs.com/redmine/my/account --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Puppet Bugs" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [email protected] For more options, visit this group at http://groups.google.com/group/puppet-bugs?hl=en -~----------~----~----~----~------~----~------~--~---
