Created
November 30, 2016 07:36
-
-
Save marzzz21/6a59c5ec381660fdf38b73550df4f89e to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
================================================================================ | |
Error executing action `create` on resource 'template[/etc/iptables.d/port_apache]' | |
================================================================================ | |
Chef::Mixin::Template::TemplateError | |
------------------------------------ | |
undefined method `values' for ["*:80"]:Chef::Node::ImmutableArray | |
Did you mean? values_at | |
Resource Declaration: | |
--------------------- | |
# In /tmp/kitchen/cache/cookbooks/iptables/resources/rule.rb | |
31: template "/etc/iptables.d/#{new_resource.name}" do | |
32: source new_resource.source ? new_resource.source : "#{new_resource.name}.erb" | |
33: mode '0644' | |
34: cookbook new_resource.cookbook if new_resource.cookbook | |
35: variables new_resource.variables | |
36: backup false | |
37: notifies :run, 'execute[rebuild-iptables]', :delayed | |
38: end | |
39: end | |
Compiled Resource: | |
------------------ | |
# Declared in /tmp/kitchen/cache/cookbooks/iptables/resources/rule.rb:31:in `block in class_from_file' | |
template("/etc/iptables.d/port_apache") do | |
action [:create] | |
retries 0 | |
retry_delay 2 | |
default_guard_interpreter :default | |
source "port_apache.erb" | |
cookbook "apache2" | |
declared_type :template | |
cookbook_name "rise-mirror" | |
mode "0644" | |
path "/etc/iptables.d/port_apache" | |
end | |
Template Context: | |
----------------- | |
on line #1 | |
1: <% node['apache']['listen'].values.map(&:to_a).flatten.uniq do |port| -%> | |
2: -A FWR -p tcp -m tcp --dport <%= port %> -j ACCEPT | |
3: <% end %> | |
Platform: | |
--------- | |
x86_64-linux | |
================================================================================ | |
Error executing action `enable` on resource 'iptables_rule[port_apache]' | |
================================================================================ | |
Chef::Mixin::Template::TemplateError | |
------------------------------------ | |
undefined method `values' for ["*:80"]:Chef::Node::ImmutableArray | |
Did you mean? values_at | |
Resource Declaration: | |
--------------------- | |
# In /tmp/kitchen/cache/cookbooks/rise-mirror/recipes/apache.rb | |
7: iptables_rule 'port_apache' do | |
8: cookbook "apache2" | |
9: end | |
10: | |
Compiled Resource: | |
------------------ | |
# Declared in /tmp/kitchen/cache/cookbooks/rise-mirror/recipes/apache.rb:7:in `from_file' | |
iptables_rule("port_apache") do | |
action [:enable] | |
retries 0 | |
retry_delay 2 | |
default_guard_interpreter :default | |
declared_type :iptables_rule | |
cookbook_name "rise-mirror" | |
recipe_name "apache" | |
cookbook "apache2" | |
end | |
Template Context: | |
----------------- | |
on line #1 | |
1: <% node['apache']['listen'].values.map(&:to_a).flatten.uniq do |port| -%> | |
2: -A FWR -p tcp -m tcp --dport <%= port %> -j ACCEPT | |
3: <% end %> | |
Platform: | |
--------- | |
x86_64-linux | |
Running handlers: | |
[2016-11-30T15:31:28+08:00] ERROR: Running exception handlers | |
Running handlers complete | |
[2016-11-30T15:31:28+08:00] ERROR: Exception handlers complete | |
Chef Client failed. 1 resources updated in 06 seconds | |
[2016-11-30T15:31:28+08:00] FATAL: Stacktrace dumped to /tmp/kitchen/cache/chef-stacktrace.out | |
[2016-11-30T15:31:28+08:00] FATAL: Please provide the contents of the stacktrace.out file if you file a bug report | |
[2016-11-30T15:31:28+08:00] ERROR: | |
Chef::Mixin::Template::TemplateError (undefined method `values' for ["*:80"]:Chef::Node::ImmutableArray | |
Did you mean? values_at) on line #1: | |
1: <% node['apache']['listen'].values.map(&:to_a).flatten.uniq do |port| -%> | |
2: -A FWR -p tcp -m tcp --dport <%= port %> -j ACCEPT | |
3: <% end %> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment