Thank you very much! воскресенье, 5 октября 2014 г., 23:30:33 UTC+4 пользователь Felix Frank написал: > > Hi, > > this type of question would be better suited for the puppet-users list. > > The problem is that variable values *cannot* be overridden. You just > replace its value in the scope of the inheriting class. Only resources > can be overridden, so that is what you must do. > > class generic { > $message = 'generic' > notify { 'test': message = $message } > } > > class specific inherits generic { > $message = 'specific' > Notify['test'] { message => $message } # <- override > } > > Replacing the variable locally is fairly pointless. > > class specific inherits generic { > Notify['test'] { message => 'specific' } # <- exact same result > } > > HTH, > Felix > > On 10/05/2014 06:01 PM, Олег Сиденко wrote: > > I want to write the following structure: > > > > class CLASSA { > > $ = "AAA" > > notify {$:} > > } > > class ClassB inherits CLASSA { > > $ = "BBB" > > } > > > > > > > > Summoning of nodes > > class {ClassB:} > > > > expect to see a BBB notifah but Puppet hard shoves > > Note: AAA > > Note: / Stage [main] / Classa / Notify [AAA] / message: defined by > > 'message' as 'AAA' > > > > > > What am I doing wrong? >
-- You received this message because you are subscribed to the Google Groups "Puppet Developers" group. To unsubscribe from this group and stop receiving emails from it, send an email to puppet-dev+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/puppet-dev/95fac889-751b-4f02-afa6-b21f85bf0edd%40googlegroups.com. For more options, visit https://groups.google.com/d/optout.