I've been using 'define' to make a few custom types. For example, I have a 
simple 'file' like thing (s3::file) that downloads a file from S3, only if the 
one on the local machine doesn't match, and it can send out notifications if 
the file changed. This is basically an exec command that uses some scripts I 
wrote in an 'onlyif' to see if the MD5s don't match.

I also have another one that can deploy or undeploy an application in 
Glassfish (a Java application server) from a source file. This too is mostly 
an exec that checks to see if the application is already defined in GF, and if 
not, installs it from the source file you give it[0]. Or, alternately, removes 
it if it is defined and ensure => absent was given.

What I'd like to be able to do is have a fairly clean way of sending a 
notification that says the file has changed (that is already possible), and 
have the deploy bit know that when it gets that, it should undeploy and then 
redeploy the application.

How would I do this, assuming it's possible?

Thanks.

[0] An aside: is there a nice way to test the existence of a file so I can 
have it fail with a message if the file doesn't exist? Just for robustness's 
sake.

-- 
Robin <[email protected]> JabberID: <[email protected]>
http://www.kallisti.net.nz/blog       |||       http://identi.ca/eythian

PGP Key 0xA99CEB6D = 5957 6D23 8B16 EFAB FEF8  7175 14D3 6485 A99C EB6D

Attachment: signature.asc
Description: This is a digitally signed message part.

Reply via email to