chef-cookbooks / iptables

Development repository for Chef Cookbook iptables
https://supermarket.chef.io/cookbooks/iptables
Apache License 2.0
102 stars 141 forks source link

Compilation error on version 2.2.0 #50

Closed aiman-alsari closed 8 years ago

aiman-alsari commented 8 years ago

Just recently updated to the latest version (last night?) and it doesn't work. See stacktrace below.

================================================================================
Recipe Compile Error in /var/chef/cache/cookbooks/iptables/resources/rule.rb
================================================================================

NoMethodError
-------------
undefined method `property' for Chef::Resource::IptablesRule:Class

Cookbook Trace:
---------------
  /var/chef/cache/cookbooks/iptables/resources/rule.rb:20:in `class_from_file'

Relevant File Content:
----------------------
/var/chef/cache/cookbooks/iptables/resources/rule.rb:

 13:  #
 14:  # Unless required by applicable law or agreed to in writing, software
 15:  # distributed under the License is distributed on an "AS IS" BASIS,
 16:  # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 17:  # See the License for the specific language governing permissions and
 18:  # limitations under the License.
 19:  
 20>> property :name, kind_of: String, name_attribute: true
 21:  property :source, kind_of: String, default: nil
 22:  property :cookbook, kind_of: String, default: nil
 23:  property :variables, kind_of: Hash, default: {}
 24:  
 25:  action :enable do
 26:    execute 'rebuild-iptables' do
 27:      command '/usr/sbin/rebuild-iptables'
 28:      action :nothing
 29:    end
BobbyRyterski commented 8 years ago

I ran into this as well.

coderanger commented 8 years ago

This cookbook now requires Chef 12.5+, you are using a version older than that.

amodpandey commented 8 years ago

Would it make sense to have chef_version in the metadata. Might help with the issue