On Mar 9, 2010, at 11:41 AM, Mathew Binkley wrote:

> Hi everyone.  I am trying to manage several different packages using
> Puppet.  For the sake of maintainability, each package is installed in
> its own separate puppet directory.  Each package would have a separate
> install_package.pp script and corresponding folder in /etc/puppet/
> files on the server:
> 
>    /etc/puppet/files/foo/
>                         etc/
>                         root/
>                         usr/local
> 
>   /etc/puppet/files/bar/
>                         etc/
>                         var/lib
> 
> To avoid micromanaging, I would like to simply copy over the contents
> of each folder to / on the client.  While each package has directories
> in common (/etc for example), all of the files in each package are
> orthogonal and not shared between packages.  For example, package foo
> will be the only package that will ever install /etc/foo.conf.
> Package bar will never manage it.
> 

Can't you split it into stuff that changes and stuff that doesn't, and then put 
the stuff that doesn't change into a package.  Then put what ever changes into 
sub directories?

If that doesn't work, you could copy and extract a tar file with something like 
this:

#Don't use /tmp because some distro's nuke that at startup.
#/var/puppet_tmp/ won't exist.  Make sure you create it.
   file { "/var/puppet_tmp/test.tar.gz":
        owner => "root",
        group => "root",
        mode => 750,
        source => "puppet:///module_name/test.tar.gz",
        require => File["/var/puppet_tmp"]
        }

        exec { "/bin/tar -xvz /var/puppet_tmp/test.tar.gz":
                cwd => "/",
                subscribe => File["/var/puppet_tmp/test.tar.gz"],
                require => File["/var/puppet_tmp/test.tar.gz"]
        }

If you do that a lot, wrapping it in a define shouldn't be too hard.

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