# recipes/*.rb
iptables_rule 'redis' do
source 'config/iptables.erb'
variables(nodes: nodes)
end
# templates/*.erb
-A INPUT -s 127.0.0.1 -j ACCEPT -p tcp --dport 6379
Expected Result:
- /var/chef/cache/cookbooks/iptables/resources/rule.rb:22:in `class_from_file'
Default value {} is invalid for property #<ChefCompat::CopiedFromChef::Chef::Property:0x0000000573ed08>. In Chef 13 this will become an error: undefined method `validate' for nil:NilClass. at 1 location:
- /var/chef/cache/cookbooks/iptables/resources/rule.rb:23:in `class_from_file'
Actual Result:
- /var/chef/cache/cookbooks/iptables/resources/rule.rb:22:in `class_from_file'
Default value {} is invalid for property #<ChefCompat::CopiedFromChef::Chef::Property:0x0000000573ed08>. In Chef 13 this will become an error: undefined method `validate' for nil:NilClass. at 1 location:
- /var/chef/cache/cookbooks/iptables/resources/rule.rb:23:in `class_from_file'
that was either an old bug in the cookbook, an old bug in chef-client or an old bug in the compat_resources cookbook, either way i can't replicate it now.
Cookbook version
2.2.0
Chef-client version
12.7+
Platform Details
RHEL
Scenario:
In Chef 13 this will become an error.
Steps to Reproduce:
Expected Result:
Actual Result: