[chef] Re: Overriding chef built-in providers


Chronological Thread 
  • From: Tensibai < >
  • To:
  • Subject: [chef] Re: Overriding chef built-in providers
  • Date: Thu, 20 Mar 2014 16:43:49 +0100

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.

§