You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Dec 13, 2022. It is now read-only.
When I created a parameter.rb under recipes directory and uploaded to the Chef automate, knife displayed below syntax error message. Would you help me what did I wrong?
#cat ~/sysctl/recipes/parameter.rb
include_recipe 'sysctl::default'
sysctl_multi 'ip config' do
instructions {
'net.ipv4.ip_forward' => '1',
'net.ipv6.conf.all.forwarding' => '1',
'net.ipv4.tcp_syncookies' => '1'}
end
Just include () like below.
#cat ~/sysctl/recipes/parameter.rb
include_recipe 'sysctl::default'
sysctl_multi 'ip config' do
instructions ({
'net.ipv4.ip_forward' => '1',
'net.ipv6.conf.all.forwarding' => '1',
'net.ipv4.tcp_syncookies' => '1'})
end
Sign up for freeto subscribe to this conversation on GitHub.
Already have an account?
Sign in.
When I created a parameter.rb under recipes directory and uploaded to the Chef automate, knife displayed below syntax error message. Would you help me what did I wrong?
#cat ~/sysctl/recipes/parameter.rb
include_recipe 'sysctl::default'
sysctl_multi 'ip config' do
instructions {
'net.ipv4.ip_forward' => '1',
'net.ipv6.conf.all.forwarding' => '1',
'net.ipv4.tcp_syncookies' => '1'}
end
1103143ui-MacBook-Pro:chef-repo a1103143$ knife cookbook upload sysctl
Uploading sysctl [0.1.7]
FATAL: Cookbook file recipes/parameter.rb has a ruby syntax error:
FATAL: /Users/a1103143/chef-repo/cookbooks/sysctl/recipes/parameter.rb:22: syntax error, unexpected =>, expecting '}'
FATAL: 'net.ipv4.ip_forward' =>'1',
FATAL: ^
FATAL: /Users/a1103143/chef-repo/cookbooks/sysctl/recipes/parameter.rb:22: syntax error, unexpected ',', expecting '}'
FATAL: /Users/a1103143/chef-repo/cookbooks/sysctl/recipes/parameter.rb:23: syntax error, unexpected =>, expecting '}'
FATAL: 'net.ipv6.conf.all.forwarding' =>'1',
FATAL: ^
FATAL: /Users/a1103143/chef-repo/cookbooks/sysctl/recipes/parameter.rb:23: syntax error, unexpected ',', expecting '}'
FATAL: /Users/a1103143/chef-repo/cookbooks/sysctl/recipes/parameter.rb:24: syntax error, unexpected =>, expecting '}'
FATAL: 'net.ipv4.tcp_syncookies' =>'1'}
The text was updated successfully, but these errors were encountered: