[chef] Changing attributes in provider


Chronological Thread 
  • From: Sergey Motovilovets < >
  • To:
  • Subject: [chef] Changing attributes in provider
  • Date: Thu, 6 Nov 2014 21:09:40 +0200

Hi

Need some help here
I'm trying to implement provider which is supposed to update node attributes
Recipe has something like

resource_name 'foo' do
  action :get
  destination node.override[:test]
end

Provider draft:
...
def destination
    new_resource.destination
end
...
destination.update( {"foo" => "bar"} )
...

When I call
Chef::Log.info node[:test]
from provider - it echoes {"foo"=>"bar"}, just as supposed to
But following actions in a recipe can see no changes in this attribute, it remains empty



Archive powered by MHonArc 2.6.16.

§