Hi all.

I am trying to use debian package preseeding within my modules.
Therefor I have created a preseed_package.pp like:

define authentication::preseed_package ( $ensure ) {
        file { "/var/local/preseed/$name.preseed":
                source => "$module_path/files/$name.preseed",
                mode => 600,
                backup => false,
                require => File["/var/local/preseed"],
        }
        package { "$name":
                ensure => $ensure,
                responsefile => "/var/local/preseed/$name.preseed",
                require => File["/var/local/preseed/$name.preseed"],
        }
}

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.

But now to the main question: as you can see from above, the file
deployment requires a directory /var/local/preseed/ to be present.

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

class authentication {
        # general module settings
        $module_name = "authentication"
        $module_path = "$puppet_standalone/modules/$module_name"

        # preseed functionality
        file { "/var/local/preseed":
                owner => root, group => root, mode => 755,
                ensure => "directory",
        }


}

Or perhaps even at the top of preseed_package.pp?

Best Regards
Marcus

-- 
You received this message because you are subscribed to the Google Groups 
"Puppet Users" group.
To post to this group, send email to puppet-us...@googlegroups.com.
To unsubscribe from this group, send email to 
puppet-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/puppet-users?hl=en.

Reply via email to