Mike schrieb:> Consider the following construct:
>
> $frontends = [ "frontend0.mycompany.com",
"frontend1.mycompany.com" ]
>
> node $frontends {
> ...
> }
>
> It seems that Puppet really wants a literal, not a variable, after the
> node keyword. Incidentally, it doesn''t work with a single string
such
> as $frontend = "..." either. Is this behavior by design?
I''d say "due to design", since node statements and variables
are
evaluated at different times.
> It seems like> an attractive code structure, particularly with a setup like this:
>
> $fe = [ "frontend0", "frontend1"...]
> $be = [ "backend0", "backend1"...]
>
> node $fe {
> configuration_to_talk_to_backends($be)
> }
>
> node $be {
> configuration_of_firewall_to_allow_frontends($fe)
> }
>
> If I can''t use a variable node name, then it seems I have to list
my
> machine names twice.
You can always use ExternalNodeClassification[1] to achieve some of what
you want outside of your manifest.
The $certname or $hostname should provide another piece of the puzzle
you need.
And finally you can use ExportedResources[2] to "send" resources from
one host(group) to another host(group).
Regards, DavidS
[1] http://reductivelabs.com/trac/puppet/wiki/ExternalNodeClassification
[2] http://reductivelabs.com/trac/puppet/wiki/ExportedResources
--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---