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
exec
already has acreates
parameter that helps sometimes. Puppet resources should be designed to be idempotent, so it wouldn't hurt to apply them repeatedly. If you can edit the question to add some more information, it might narrow down possible solutions. – Mike Renfro Mar 17 '13 at 22:08ps aux | grep zookeeper | wc -l
> 1, if so, skip all other steps? Instead of cleaning unpacked files it's better to keep it at filesystem? – Tombart Mar 18 '13 at 14:04package
resource to ensure you have the latest version. Steps 3 and 5 would be best handled withfile
andservice
resources. The whole thing could then be wrapped up into a self-contained zookeeper module. Do zookeeper packages already exist for your distribution? Or are they the wrong version, etc? – Mike Renfro Mar 18 '13 at 21:04package
,file
, andservice
as given before. The packaging could be as simple asapt-get -b source zookeeper
, with appropriate deb-src lines in /etc/apt/sources.list. – Mike Renfro Mar 19 '13 at 16:38