Dear John,
I tryed as you suggested, and didn't work.
I Found where is the problem that produces the failure in both cases. The
problem basically is that on all the nodes I'm using inherits definition
like:
node basenode {
include shorewall
include othermodules
}
node examplenode1 inherits basenode {
include apache
include bind
include ssh
}
So I tryed debugging and on the template I added following lines:
<% classes.each do |k| -%>
<%= k %>
<% end -%>
Then I find that it only prints classes inside basenode:
shorewall
other modules
If I declare host without inherits then, both procedures works, my first
and yours. And in this example , classes will print:
shorewall
other modules
apache
bind
ssh
It is pretty clear to me that this seems a puppet bug that does not parse
properly classes when you are using inherits in site.pp manifets.
El viernes, 15 de febrero de 2013 21:10:41 UTC+1, jcbollinger escribió:
>
>
>
> On Friday, February 15, 2013 10:51:06 AM UTC-6, Marc Bolós wrote:
>>
>> Dear John,
>>
>> I tryed as you suggested but I think I'm doing something wrong.
>>
>> I can also see this line is same:
>> $service_modules = hiera_array('service_modules')
>>
>> It is correct?
>>
>> Where do I define array of modules? where you write service_modules?
>>
>
>
> The code was intended as an example. If you want to use it exactly as
> written, then you must configure Puppet's "hiera" external data subsystem
> on the master, and record the module list in a hiera data file (supposing
> you use the YAML back end). That has a lot of advantages, but if you don't
> know what I'm talking about then you might be better off starting simpler.
>
> A very simple proof of concept would be to put
>
> $fw_modules = ['apache2', 'bind9', 'ssh']
>
> (or whatever module list you want) at the beginning of your
> manifests/site.pp (outside any node block), and replace each of the two
> lines invoking hiera_array() with this:
>
> $service_modules = $::fw_modules
>
> Once you've satisfied yourself that it works (which it should), you can
> figure out a more appropriate way to declare the shared data.
>
>
> John
>
>
--
You received this message because you are subscribed to the Google Groups
"Puppet Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/puppet-users?hl=en.
For more options, visit https://groups.google.com/groups/opt_out.