Hi I am trying to use the chef_nginx cookbook version 5.0.7.
Getting the Error as
35: nginx_site 'Disable default site' do
36>> name 'default'
37: action node['nginx']['default_site_enabled'] ? :enable : :disable
Chef-client is CentOS 6.5.
Has anyone experienced the same error ?
Sorry the Error message is
wrong number of arguments (given 1, expected 0)
Does this happen to be the same issue as https://github.com/chef-cookbooks/chef_nginx/issues/72? Even if not it sounds like the same issue so let’s follow up there as we’re going to need some more detail as to what is in the run_list, versions, and such to help troubleshoot this further.
Hi, Yes it is the same. I have tested Like this
I have a cookbook "mylab-nginx " In this cookbook
This just worked fine. nginx installed and I see the default site enabled
I am including “mylab-nginx” in another cookbook “mylab-apptest” which has the templates, web config files etc.
In the “mylab-apptest” I am disabling the default site. Now I get the error
My chef client is
I think this is possible in my case.
I use a cookbook “mylab-base” which depends on cookbook “zabbix” along with many other cookbooks.
in the metadata.rb, of the zabbix cookbook I see,
depends 'nginx', '>= 1.0.0'
So, in my setup nginx cookbook is also installed.So is, chef_nginx
Run list looks like,
In the mylab-base if I remove the
depends "zabbix" I don’t get any error.
So, could it be the case of nginx and chef_nginx both cookbooks being in place ?
That’s definitely going to cause issues trying to use the chef_nginx and nginx cookbooks in the same run_list.
Argh. munin also introduces this collision since it has a dependency on the “old” nginx. What’s the solution for these cases?
In my case I changed dependency of zabbix cookbook ‘nginx’ to ‘chef_nginx’. However I am running everything in a lab. But my zabbix Clients are doing good as of now.