[chef] Re: Place file only once per version


Chronological Thread 
  • From: Ranjib Dey < >
  • To:
  • Subject: [chef] Re: Place file only once per version
  • Date: Thu, 15 Aug 2013 03:40:29 -0700

inside a recipe

if node.attribute?('bar')
  Chef::Log.info('already run')
else
  ruby_block 'set_attribute' do
    block do
      nod.set['foo']='bar'
    end
  end
   file '/foo/bar' do
     content "foobar"
   end
end


On Thu, Aug 15, 2013 at 3:20 AM, < " target="_blank"> > wrote:
Hello,

Would would be the best way to only place a file once per cookbook version. It's modified and removed outside chef.

Regards
D.





Archive powered by MHonArc 2.6.16.

§