Greetings,
I’m a bit lost how this works:
resources/ring.rb
actions :set
default_action :set
property :interface, String, name_property: true
property :rx, Integer
property :tx, Integer
load_current_value do
rx 512
tx 512
end
providers/ring.rb
use_inline_resources
action :set do
converge_if_changed :rx do
log 'aaa' do
message 'aaaa'
level :info
end
end
converge_if_changed :tx do
log 'bbbb' do
message 'bbbb'
level :info
end
end
end
recipes/default.rb
mycookbook_ring 'eth0' do
rx 512
tx 512
end
For some reason chef ignores load_current_value block and as a result converge_if_changed is always true.
Tho it works as designed if I append all stuff from providers/ring.rb to resources/ring.rb .
I have :
# chef-client -v
Chef: 12.21.3
Is this a bug or feature? Seems like it’s pointless to use providers/* then