On Tue, Oct 19, 2010 at 3:06 AM, Bruce Richardson <itsbr...@workshy.org> wrote: > On Tue, Oct 19, 2010 at 11:32:26AM +0200, Arnau Bria wrote: >> I don't remember from where I took the idea... but seems that I chose >> wrong place :-) What do you recommend me? any doc to follow? > > Unfortunately, I don't think there is great documentation out there; the > core development team is too busy and so are most of the users. > Documentation lags behind. I'd love to add better documentation to > Puppet but I have a very busy and stressful job, so I fail too. But in > any case...
Even if people don't have time to provide documentation, it would be extremely helpful if people filed clear bugs/features against the documentation so we know what you really want to see. This also means when someone decides to work on improving the docs, there is a reasonably clear list of priorities. http://docs.puppetlabs.com/contribute.html > >> > the included class had better be in the file found by the >> > autoloader). I hope that's a little clearer. >> >> Reading your answer (and if I thought a little more about it before), my >> question >> could be answered by myself. As you say import "inserts" code, so >> having 2 diff defaults in 2 diff sites does not make much sense, or does not >> behave as I wish. > > Great! Now that you understand better how imports and includes work, > you're answering your own questions. I bet you can work out a better > way of laying out your manifests for yourself. > > The best advice I can give you is to work with the way puppet > module/class autoloading works, not against it. > >> >> If I redefine File defaults in comuting_bacula (in the class, not >> module) it's evaluted and it's more important: >> >> class computing_bacula { >> File { mode => 755 } >> } >> File { 'kaka' } >> >> on client: >> notice: /Stage[main]/Computing_bacula/File[kaka]/mode: mode changed '666' to >> '755' >> >> >> So class defaults "are more important" than site dfaults. > > If there is a conflict between an already declared default and a new > default, the new default wins. If there is no conflict, they are added > together. If you go back to my example, I set a default of "ensure = > file" at the top level. Because none of the later defaults had an > "ensure" parameter, all files inherited that default. I also set "mode > = 750" at the top level, but in some places I later declared "mode" > again. In such cases, the declaration in the most immediate scope > always wins. > > -- > Bruce > > What would Edward Woodward do? > > -----BEGIN PGP SIGNATURE----- > Version: GnuPG v1.4.9 (GNU/Linux) > > iEYEARECAAYFAky9bZQACgkQtkVqYTMBSwFdBACeI6QKolxGcX0CarlNOSpoJLAH > WiYAn3YGrDGWqt6etbuECtja6SWPQAoH > =Eqvm > -----END PGP SIGNATURE----- > > -- You received this message because you are subscribed to the Google Groups "Puppet Users" group. To post to this group, send email to puppet-us...@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.