Hi Marcus,

On 16 mrt, 14:26, Marcus Moeller <[email protected]> wrote:
> First of all I would like to know if it's possible to use variables
> within the define statement, e.g.:
>
> define $module_name::preseed_package
>
> This would make the define much more flexible as I could then just
> copy it over to the other modules if necessary.

Not directly, although I wrote about a way to create the same idea a
few months ago:
http://groups.google.com/group/puppet-users/browse_thread/thread/c37707bcedb2d0bd

I've been using this extensively and it seems to work just fine.

> I wonder what's the best way to create this directory? Within the
> init.pp of the specific module, e.g ?.:

I'd use the following:

if ! defined(File["/var/local/preseed"]) {
  file { "/var/local/preseed":
                owner => root, group => root, mode => 755,
                ensure => "directory",
        }
}

Because ordering is not an issue here.

Hope this helps!

--
Kind regards,
Tim

-- 
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.

Reply via email to