Should we add a config_test param to template resources?


#1

Does anyone else wish we could keep the template resource from writing if the file doesn’t pass apachectl configtest or visudo -c?

I’ve created a feature request for it here: http://tickets.opscode.com/browse/CHEF-3004

Before I go off and code it, does anyone think this is a Bad Idea?


http://josephholsten.com


#2

On Monday, March 26, 2012 at 8:14 AM, Joseph Anthony Pasquale Holsten wrote:

Does anyone else wish we could keep the template resource from writing if the file doesn’t pass apachectl configtest or visudo -c?

I’ve created a feature request for it here: http://tickets.opscode.com/browse/CHEF-3004

Before I go off and code it, does anyone think this is a Bad Idea?
I like it. I just recently hacked up our sudo cookbook to run a sanity check, which required three resources in place of the one.


http://josephholsten.com


Dan DeLeo


#3

I like this too. I’ve used the following monkey-patch to the template
provider which allows you to pass in a block. The template only gets
written if the block returns true. I’d love to see something more
like the not_if/only_if resource where you could pass a block or a
string.

On Mon, Mar 26, 2012 at 8:41 AM, Daniel DeLeo dan@kallistec.com wrote:

On Monday, March 26, 2012 at 8:14 AM, Joseph Anthony Pasquale Holsten wrote:

Does anyone else wish we could keep the template resource from writing if the file doesn’t pass apachectl configtest or visudo -c?

I’ve created a feature request for it here: http://tickets.opscode.com/browse/CHEF-3004

Before I go off and code it, does anyone think this is a Bad Idea?
I like it. I just recently hacked up our sudo cookbook to run a sanity check, which required three resources in place of the one.


http://josephholsten.com


Dan DeLeo