If I try the following: class foo { define bar ($text) { file {"/tmp/foo.txt": content => $text, } } bar { "hello": text => ''Hello World'', } } class foo2 inherits foo { Foo::bar["default"] { text => ''Hello World Again'', } } I get: "Syntax error at '':''; expected ''}'' at /etc/puppet/manifests/ modules/foo.pp:14" The only way I can get this syntax to work is to move the ''bar'' definition outside of the foo class and refer to it by a name without ''::'' in it in foo2. Is there a way to override a definition with ''::'' in its name? --~--~---------~--~----~------------~-------~--~----~ 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+unsubscribe@googlegroups.com For more options, visit this group at http://groups.google.com/group/puppet-users?hl=en -~----------~----~----~----~------~----~------~--~---
Hi> Foo::bar["default"] { > [...] > The only way I can get this syntax to work is to move the ''bar'' > definition outside of the foo class and refer to it by a name without > ''::'' in it in foo2. Is there a way to override a definition with ''::'' > in its name?it''s Foo::Bar["default"] { greets pete --~--~---------~--~----~------------~-------~--~----~ 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+unsubscribe@googlegroups.com For more options, visit this group at http://groups.google.com/group/puppet-users?hl=en -~----------~----~----~----~------~----~------~--~---
On Oct 8, 1:31 am, Peter Meier <peter.me...@immerda.ch> wrote:> > it''s Foo::Bar["default"] { >That worked perfectly, thanks Pete! --~--~---------~--~----~------------~-------~--~----~ 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+unsubscribe@googlegroups.com For more options, visit this group at http://groups.google.com/group/puppet-users?hl=en -~----------~----~----~----~------~----~------~--~---
On Oct 8, 3:31 am, Peter Meier <peter.me...@immerda.ch> wrote:> Hi > > > Foo::bar["default"] { > > [...] > > The only way I can get this syntax to work is to move the ''bar'' > > definition outside of the foo class and refer to it by a name without > > ''::'' in it in foo2. Is there a way to override a definition with ''::'' > > in its name? > > it''s Foo::Bar["default"] {Let me just mention that this use of capitalization is *so totally bizarre*. And not really explained anywhere; what does it mean, why is it there at all? --~--~---------~--~----~------------~-------~--~----~ 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+unsubscribe@googlegroups.com For more options, visit this group at http://groups.google.com/group/puppet-users?hl=en -~----------~----~----~----~------~----~------~--~---
Hi>>> Foo::bar["default"] { >>> [...] >>> The only way I can get this syntax to work is to move the ''bar'' >>> definition outside of the foo class and refer to it by a name without >>> ''::'' in it in foo2. Is there a way to override a definition with ''::'' >>> in its name? >> it''s Foo::Bar["default"] { > > Let me just mention that this use of capitalization is *so totally > bizarre*. And not really explained anywhere; what does it mean, why > is it there at all?capitalization is refering to an already defined object/resource (so to an "instance" of foo::bar) in an inheritance chain. for me it totally makes sense to divide between overwriting and actually defining resources. greets pete --~--~---------~--~----~------------~-------~--~----~ 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+unsubscribe@googlegroups.com For more options, visit this group at http://groups.google.com/group/puppet-users?hl=en -~----------~----~----~----~------~----~------~--~---
On Oct 9, 2:03 am, Peter Meier <peter.me...@immerda.ch> wrote:> >>> Foo::bar["default"] { > >>> [...] > >>> The only way I can get this syntax to work is to move the ''bar'' > >>> definition outside of the foo class and refer to it by a name without > >>> ''::'' in it in foo2. Is there a way to override a definition with ''::'' > >>> in its name? > >> it''s Foo::Bar["default"] { > > > Let me just mention that this use of capitalization is *so totally > > bizarre*. And not really explained anywhere; what does it mean, why > > is it there at all? > > capitalization is refering to an already defined object/resource (so to > an "instance" of foo::bar) in an inheritance chain. for me it totally > makes sense to divide between overwriting and actually defining resources.As I do more stuff I will see if that explanation helps me understand it. In general, I find what''s most missing from documentation these days is the explanation of the philosophical underpinnings of a design -- to me, that''s the "how do the developers think about this?" question, and that''s what I most need to have explained to me to start making sense of something. And the documentation tends to start at the bottom, with cookbook explanations of how to do a few things, and no explanations of how things relate. Very frequently, it makes *perfect* sense if I can just figure out what position I need to get my mind into first! --~--~---------~--~----~------------~-------~--~----~ 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+unsubscribe@googlegroups.com For more options, visit this group at http://groups.google.com/group/puppet-users?hl=en -~----------~----~----~----~------~----~------~--~---
Hi> In general, I find what''s most missing from documentation these days > is the explanation of the philosophical underpinnings of a design -- > to me, that''s the "how do the developers think about this?" question, > and that''s what I most need to have explained to me to start making > sense of something. And the documentation tends to start at the > bottom, with cookbook explanations of how to do a few things, and no > explanations of how things relate. > > Very frequently, it makes *perfect* sense if I can just figure out > what position I need to get my mind into first!most parts of the documentation are public editable wikis, so feel free to add content. greets pete --~--~---------~--~----~------------~-------~--~----~ 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+unsubscribe@googlegroups.com For more options, visit this group at http://groups.google.com/group/puppet-users?hl=en -~----------~----~----~----~------~----~------~--~---
On Oct 10, 12:27 pm, Peter Meier <peter.me...@immerda.ch> wrote:> Hi > > > In general, I find what''s most missing from documentation these days > > is the explanation of the philosophical underpinnings of a design -- > > to me, that''s the "how do the developers think about this?" question, > > and that''s what I most need to have explained to me to start making > > sense of something. And the documentation tends to start at the > > bottom, with cookbook explanations of how to do a few things, and no > > explanations of how things relate. > > > Very frequently, it makes *perfect* sense if I can just figure out > > what position I need to get my mind into first! > > most parts of the documentation are public editable wikis, so feel free > to add content.yep, and I verified today that when I''m logged in I *do* see an edit link. Of course, when I''m not sure I understand something, it''s probably not the kindest thing to do to ask questions by writing a document incorporating my current understanding and then watch for corrections :-). --~--~---------~--~----~------------~-------~--~----~ 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+unsubscribe@googlegroups.com For more options, visit this group at http://groups.google.com/group/puppet-users?hl=en -~----------~----~----~----~------~----~------~--~---
On Oct 8, 2008, at 1:56 PM, dd-b wrote:> > On Oct 8, 3:31 am, Peter Meier <peter.me...@immerda.ch> wrote: >> Hi >> >>> Foo::bar["default"] { >>> [...] >>> The only way I can get this syntax to work is to move the ''bar'' >>> definition outside of the foo class and refer to it by a name >>> without >>> ''::'' in it in foo2. Is there a way to override a definition with >>> ''::'' >>> in its name? >> >> it''s Foo::Bar["default"] { > > Let me just mention that this use of capitalization is *so totally > bizarre*. And not really explained anywhere; what does it mean, why > is it there at all?Some parts of Puppet are designed, some are accreted, and some are somewhere in between, as with most software projects and languages. Puppet''s capitalization is influenced by Ruby''s, but not nearly so consistently as Ruby''s is, unfortunately. The basic theories you''re encountering are: - Instances use lower case, collections are capitalized. - Treating the ''[]'' syntax as operating on the Foo::Bar collection of instances. In other words, your retrieving an instance from a collection. One can certainly argue that these aren''t *good* theories, or aren''t realized perfectly, but that''s what I was thinking when I wrote it. One of my goals for the coming year is to try to fix some of these niggling inconsistencies in the language, but we''ll see. -- Silence is a text easy to misread. -- A. A. Attanasio, ''The Eagle and the Sword'' --------------------------------------------------------------------- Luke Kanies | http://reductivelabs.com | http://madstop.com --~--~---------~--~----~------------~-------~--~----~ 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+unsubscribe@googlegroups.com For more options, visit this group at http://groups.google.com/group/puppet-users?hl=en -~----------~----~----~----~------~----~------~--~---
On Oct 13, 10:11 am, Luke Kanies <l...@madstop.com> wrote:> On Oct 8, 2008, at 1:56 PM, dd-b wrote: > > > On Oct 8, 3:31 am, Peter Meier <peter.me...@immerda.ch> wrote: > >> Hi > > >>> Foo::bar["default"] { > >>> [...] > >>> The only way I can get this syntax to work is to move the ''bar'' > >>> definition outside of the foo class and refer to it by a name > >>> without > >>> ''::'' in it in foo2. Is there a way to override a definition with > >>> ''::'' > >>> in its name? > > >> it''s Foo::Bar["default"] { > > > Let me just mention that this use of capitalization is *so totally > > bizarre*. And not really explained anywhere; what does it mean, why > > is it there at all? > > Some parts of Puppet are designed, some are accreted, and some are > somewhere in between, as with most software projects and languages. > > Puppet''s capitalization is influenced by Ruby''s, but not nearly so > consistently as Ruby''s is, unfortunately. > > The basic theories you''re encountering are: > > - Instances use lower case, collections are capitalized. > - Treating the ''[]'' syntax as operating on the Foo::Bar collection of > instances. In other words, your retrieving an instance from a > collection. > > One can certainly argue that these aren''t *good* theories, or aren''t > realized perfectly, but that''s what I was thinking when I wrote it.Thanks. I need to understand it a lot more than I need to "approve" of it; in fact I can''t really have any strong opinion until after I understand it. I started in on Ruby a couple of years ago, but it only lasted a few days for me (I didn''t have a real need for a new language, and I''m pretty comfortable using Perl inheritance and object structures), so I''m not always picking up on features that were just inherited from the underlying language.> One of my goals for the coming year is to try to fix some of these > niggling inconsistencies in the language, but we''ll see.Consistency is good, but of course there are always 10x hours of things needing doing and 1x hours of time to do them in. --~--~---------~--~----~------------~-------~--~----~ 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+unsubscribe@googlegroups.com For more options, visit this group at http://groups.google.com/group/puppet-users?hl=en -~----------~----~----~----~------~----~------~--~---