On Apr 11, 2009, at 5:16 AM, Robin Sheat wrote:
> 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?
You can set up relationships with defines like any other resource, so
this should be as easy as any other notification.
>
> 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.
On the client side? The only way I can think of doing this right now
is with an exec.
--
Wear the old coat and buy the new book. -- Austin Phelps
---------------------------------------------------------------------
Luke Kanies | http://reductivelabs.com | http://madstop.com
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"Puppet Users" group.
To post to this group, send email to puppet-users@googlegroups.com
To unsubscribe from this group, send email to
puppet-users+unsubscribe@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/puppet-users?hl=en
-~----------~----~----~----~------~----~------~--~---