avc
February 22, 2017, 3:21pm
1
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
38: end
Chef-client is CentOS 6.5.
Has anyone experienced the same error ?
Regards,
A
avc
February 22, 2017, 3:21pm
2
Sorry the Error message is
ArgumentError
-------------
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.
-cheeseplus
avc
February 23, 2017, 12:22pm
4
Hi, Yes it is the same. I have tested Like this
First,
I have a cookbook "mylab-nginx " In this cookbook
include_recipe 'chef_nginx::default'
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
chef-client -v
Chef: 12.17.44
Regards,
A
avc
February 23, 2017, 5:31pm
5
Hi,
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,
"run_list": [
"recipe[mylab-base]",
"recipe[mylab-nginx]"
"recipe[mylab-apptest]"
]
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 ?
Regards,
A
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?
avc
March 2, 2017, 3:57pm
8
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.