Guard based on variable defined

Hi,

I’m trying to configure a Chef server but I’m running into this problem
when adding a key to a client:

chef-server-ctl add-client-key <client_name> <path_to_pub_key_file>
/opt/opscode/embedded/lib/ruby/gems/2.1.0/gems/chef-12.0.3/lib/chef/http.rb:125:in
post': wrong number of arguments (0 for 2..3) (ArgumentError) from /opt/opscode/embedded/service/omnibus-ctl/helpers/key_ctl_helper.rb:43:inpost_rest’
from (eval):74:in block (2 levels) in load_files' from /opt/opscode/embedded/lib/ruby/gems/2.1.0/gems/omnibus-ctl-0.3.4/lib/omnibus-ctl.rb:177:incall’
from
/opt/opscode/embedded/lib/ruby/gems/2.1.0/gems/omnibus-ctl-0.3.4/lib/omnibus-ctl.rb:177:in
block in add_command_under_category' from /opt/opscode/embedded/lib/ruby/gems/2.1.0/gems/omnibus-ctl-0.3.4/lib/omnibus-ctl.rb:566:inrun’
from
/opt/opscode/embedded/lib/ruby/gems/2.1.0/gems/omnibus-ctl-0.3.4/bin/omnibus-ctl:31:in
<top (required)>' from /opt/opscode/embedded/bin/omnibus-ctl:23:inload’
from /opt/opscode/embedded/bin/omnibus-ctl:23:in `’

Chef server version is the latest installed by the chef-server cookbook,
looks like 12.0.3 from the gem.

Is this a bug or a usage problem?


Yoshi Spendiff
Ops Engineer
Indochino
Mobile: +1 778 952 2025
Email: yoshi.spendiff@indochino.com