を使用して Ubuntu14.04 へのファイアウォールのクックブックを作成していChef
ます。
バークスファイル
source "https://api.berkshelf.com"
cookbook 'firewall'
site-cookbooks/ufw/recipes/default.rb
firewall 'ufw'
firewall_rule 'http' do
port 80
end
firewall_rule 'https' do
port 443
end
サイトクックブック/ufw/metadata.rb
depends 'firewall'
ノード/myserver.json
{
"run_list": [
"firewall",
"ufw"
]
}
knife solo cook myserver
次のようなエラーで終了します。
Recipe: firewall::default
* firewall[default] action restart
================================================================================
Error executing action `restart` on resource 'firewall[default]'
================================================================================
NoMethodError
-------------
undefined method `include?' for :create:Symbol
Cookbook Trace:
---------------
/home/ironsand/chef-solo/cookbooks-3/firewall/libraries/provider_firewall_ufw.rb:67:in `block (2 levels) in <class:FirewallUfw>'
/home/ironsand/chef-solo/cookbooks-3/firewall/libraries/provider_firewall_ufw.rb:66:in `each'
/home/ironsand/chef-solo/cookbooks-3/firewall/libraries/provider_firewall_ufw.rb:66:in `block in <class:FirewallUfw>'
Resource Declaration:
---------------------
# In /home/ironsand/chef-solo/cookbooks-3/firewall/recipes/default.rb
22: firewall 'default' do
23: ipv6_enabled node['firewall']['ipv6_enabled']
24: action :install
25: end
26:
Compiled Resource:
------------------
# Declared in /home/ironsand/chef-solo/cookbooks-3/firewall/recipes/default.rb:22:in `from_file'
firewall("default") do
action [:install]
updated true
retries 0
retry_delay 2
default_guard_interpreter :default
declared_type :firewall
cookbook_name :firewall
recipe_name "default"
ipv6_enabled true
enabled true
rules {"ufw"=>{}}
end
私が間違っていることは何ですか?どうすれば修正できますか?