I'd like to install source code packages which doesn't have binary packages (deb, rpm) yet.
How do I stop execution of a module in case that the module is already install on that machine?
I'm using:
Exec {
creates => "${zookeeper_path}/zookeeper/bin/zkServer.sh"
}
however all the other block are executed anyway. What is the best way? Checking existence of several files? I don't want to untar and recompile all the modules when puppet check for changes.
EDIT:
The installation process consists of several steps:
- fetch
tar.gz
package - untar package
- create several config files
- create service
- ensure service is running
After trying few dead-ends and from @Mike Renfro comments I came up with following steps (feel free to improve it):
Don't install packages from source code with Puppet (it takes too long and brings too many problems)
Always create binary packages. It can be easily redistributed and tested.
Set up your own repository - for Debian a good choice is reprepro, documentation seems to be awful, but there's a Puppet module for installing: puppet-reprepro. Adding new package is quite easy:
$ reprepro -Vb . includedeb squeeze ~/packages/my_package.deb
Create new packages with fpm. The process of building a package is surprisingly simple and much easier than writing it in Puppet script.
Install packages simply with:
package { "leiningen": ensure => present }
You can simply get packages which are still in testing version deploy it with your local repository.