[chef] Re: Re: Overriding chef built-in providers


Chronological Thread 
  • From: Guy Matz < >
  • To:
  • Subject: [chef] Re: Re: Overriding chef built-in providers
  • Date: Thu, 20 Mar 2014 11:55:39 -0400

Thanks, but I'd rather do it in one place, and be able to change it there rather than have to change it throughout my code if my requirements change


On Thu, Mar 20, 2014 at 11:43 AM, Tensibai < " target="_blank"> > wrote:

Why not enclosing the mounts with a 

if node.chef_environment != 'dev' do

[... mounts calls and so ont ... ]

end

or a 

do

[...]

end unless node.chef_environment == 'dev'

 

For what it worth, I wrote that without control, so I may have typos and other cross language errors, but the idea is there :)

Le 2014-03-20 16:40, Guy Matz a écrit :

Hi! I would like to override the mount provider so that it does try to mount in my dev environment . .   I was hoping to add a mount cookbook with a provider that would simply check the chef environment and make super calls if the environment is not dev.
 
Is this stupid?  Anyone have a better way?  If this doesn't sound terrible, then can someone say if what I want to do is possible?  I couldn't find anything on the nets about overriding providers .  .
 
Thanks a lot,
Guy

 

 




Archive powered by MHonArc 2.6.16.

§