Kraelog
Kraelog

Reputation: 11

Chef - Ruby - ArgumentsError expected 0

I'm trying to write a cookbook in Chef (very new) and I get the following error I cannot wrap my head around.

template node '/etc/selinux/config' do 
    source "config.erb"
    mode "0644"
    variables(
        :selinux_state => node['selinux']['selinux-state'],
        :selinux_type => node['selinux']['selinux-type']
        )
    owner duser
    group dgroup 
    action :create
    ignore_failure true

end 

FATAL: ArgumentError: wrong number of arguments (given 1, expected 0)

I checked the documentation and as far as I can tell I am following the correct syntax.

Could anyone please enlighten me where the error is?

Upvotes: 0

Views: 73

Answers (1)

codewario
codewario

Reputation: 21408

You have an extra node in the resource declaration. Change:

template node '/etc/selinux/config' do 

to

template '/etc/selinux/config' do

Upvotes: 2

Related Questions