[email protected] (Macno) writes:
> > I'd rather NOT download the install script unless I want to install
> > the software and of course the install script is designed to install
> > multiple versions (if necessary) at once. Additionally removing the
> > 2 file definitions outside of the defintion will also have issues with
> > variable scoping, thus making the solution less clean.
>
> I can guess 2 different approaches:
> 1- Moving the 2 file definitions in a class, included by the define.
> It's exactly whsat you don't like, but since the variables used in
> these 2 file types can be considered "local" and are not used in the
> define, you should be able to do that without problems
Well using a separate include would work. I'll try that. The variable
scoping does bother me as doing what you suggest means I have to be
consistent with the naming in 2 different classes. This may be
unavoidable at the moment, but I don't like it.
> 2- Use the software_install_dir variable in the name of the file
> types, and add the fixed path, something like:
> file { "$download_dir-$software_install_dir":
> owner => root,
> group => root,
> mode => 700,
> ensure => directory,
> path => $download_dir,
> }
>
> file { "$download_dir/$install_script-$software_install_dir":
> backup => false,
> owner => root,
> group => root,
> mode => 700,
> source => "puppet:///source_location/
> $install_script",
> require => File["$download_dir"],
> path => $download_dir/$install_script,
> }
>
> I personally find the first choice much better.
Yes. This is just a workarond.
I don't really see why with a definition that has a "redefine" which
is _identical_ that it should worry so much. Having a common file on the system
defined exactly the same way shouldn't be a problem. Even if I need to add a
new attribute like:
accept_duplicate_resource => true,
would be fine. I confirm to puppet that this specific definition may
lead to identical duplicates and if they occur the duplicate
definitions can be ignored.
Simon
--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---