On Thu, Jan 26, 2012 at 7:55 AM, Alexander Swen <[email protected]> wrote:
> hi,
>
> in the logs of our 2.7.10 puppet master we find messages like these:
> Dynamic lookup of $functie at /etc/puppet/manifests/server_classes.pp:52
> is deprecated. Support will be removed in Puppet 2.8. Use a fully-qualified
> variable name (e.g., $classname::variable) or parameterized classes.
>
> However, I'm a bit worried that a key functionality will be removed in
> 2.8: we set a param/value in every node telling the node what it's funtion
> is and use that in a variety of manifests to decide how to configure the
> server.
>
> we use something like:
> node servera {
> $function = 'webserver'
> include function_dependent_services
> }
> node serverb {
> $function = 'dbserver'
> include function_dependent_services
> }
>
> class function_dependent_services {
> include iptables
> include motd
> }
>
> class iptables {
> file {
> "/etc/iptables/cfg-firewall":
> content => template("iptables/cfg-firewall.erb");
> }
> }
>
> and then, somewhere in the erb we evaluate <%= function %>
>
> will this be broken in 2.8?
> and, if yes: how should we tell the erb the param that changes for a lot
> of nodes?
>
> or should I file this as a bug for v2.8?
>
> please help us out, thanks in advance
> Alex
Hi Alex,
We have a page on our website that should help you out with this -->
http://docs.puppetlabs.com/guides/scope_and_puppet.html Have you seen that
yet? That's a great place to start. You have parameterized classes that
can help you out, as well as data lookup methods like Hiera (
http://github.com/puppetlabs/hiera) that are also available.
>
> --
> You received this message because you are subscribed to the Google Groups
> "Puppet Users" group.
> To view this discussion on the web visit
> https://groups.google.com/d/msg/puppet-users/-/cRhSzVjWDNQJ.
> 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-users?hl=en.
>
--
Gary Larizza
Professional Services Engineer
Puppet Labs
--
You received this message because you are subscribed to the Google Groups
"Puppet Users" 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-users?hl=en.