usage of defines in node blocks and external nodes never played nicely, your
best way at the moment, would be to create classes which you can include via
Foreman.
(Once hashes becomes part of puppet e.g. in 2.6 - I''m guessing it would
be
much easier).
Ohad
On Fri, Jul 16, 2010 at 1:51 AM, Jon Choate <choatej@gmail.com> wrote:
> I currently have a define for setting up files in /etc/apt/preferences.d
> for different packages on different machines:
>
> define apt::preferences (
> $pattern,
> $pin,
> $pin_priority) {
>
> $cont = "Package: #{pattern}
> Pin: #{pin}
> Pin-Priority: #{pin_priority}"
> file{"/etc/apt/preferences.d/${name}.list":
> ensure => $ensure,
> content => $cont,
> owner => root,
> group => root,
> mode => 0644
> }
> }
>
> And in my site.pp I have:
>
> apt::preferences {"sun-java6-jdk":
> pattern => "sun-java6-jdk",
> pin => "release a=testing",
> pin_priority => "991"
> }
> apt::preferences {"sun-java6-jre":
> pattern => "sun-java6-jre",
> pin => "release a=lenny-backports",
> pin_priority => "991"
> }
> apt::preferences {"sun-java6-bin":
> pattern => "sun-java6-bin",
> pin => "release a=lenny-backports",
> pin_priority => "991"
> }
>
> This works fine in a regular puppet install but I''m not sure how
to get
> this to work with foreman given that I need to call this define several
> times. Any ideas?
>
> --
> 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<puppet-users%2Bunsubscribe@googlegroups.com>
> .
> For more options, visit this group at
> http://groups.google.com/group/puppet-users?hl=en.
>
--
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.