- From: Mark Pimentel <
>
- To:
- Subject: [chef] Re: Re: Definition in a RubyBlock
- Date: Thu, 9 May 2013 17:52:16 -0400
I actually like to get ideas from people as they may provide insight to tackling a problem in such a way I may not have considered. So your response is appreciated.
I have a recipe that deploys these artifacts from a nexus repo. They are simple archives and are controlled by a yaml file that I ship with the cookbook. I have a definition that I call for each one of these artifacts that are to be deployed.
Currently, I parse that yaml control file then make iterative calls to the nexus repo for the artifact information. Then I make a descision as to whether I need to deploy the artifact, or update it if it is newer than the one I have. This is controlled by dumping the nexus api call to a templated response file. If the templated response file changes, that triggers other resources in the definition to act, which is to deploy the artifact. That is the definition.
Now, the reason I want to have this definition embedded into a ruby block is to control the execution of those api calls. Currently they fire because I parse the yaml control file and iterate over each entry calling the definition. This occurs in pure ruby, which I know is called inline with the compile phase. I wanted to push this into the ruby block to have it called in the convergence phase instead.
Hope that sheds light on my problem. And once again thank you for your response and interest.
Archive powered by MHonArc 2.6.16.