{"action":"created","issue":{"url":"https://api.github.com/repos/SimpleFinance/chef-zookeeper/issues/141","labels_url":"https://api.github.com/repos/SimpleFinance/chef-zookeeper/issues/141/labels{/name}","comments_url":"https://api.github.com/repos/SimpleFinance/chef-zookeeper/issues/141/comments","events_url":"https://api.github.com/repos/SimpleFinance/chef-zookeeper/issues/141/events","html_url":"https://github.com/SimpleFinance/chef-zookeeper/issues/141","id":100540211,"number":141,"title":"Install fails with default values","user":{"login":"ianbamforth","id":7094207,"avatar_url":"https://avatars.githubusercontent.com/u/7094207?v=3","gravatar_id":"","url":"https://api.github.com/users/ianbamforth","html_url":"https://github.com/ianbamforth","followers_url":"https://api.github.com/users/ianbamforth/followers","following_url":"https://api.github.com/users/ianbamforth/following{/other_user}","gists_url":"https://api.github.com/users/ianbamforth/gists{/gist_id}","starred_url":"https://api.github.com/users/ianbamforth/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ianbamforth/subscriptions","organizations_url":"https://api.github.com/users/ianbamforth/orgs","repos_url":"https://api.github.com/users/ianbamforth/repos","events_url":"https://api.github.com/users/ianbamforth/events{/privacy}","received_events_url":"https://api.github.com/users/ianbamforth/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":2,"created_at":"2015-08-12T13:14:08Z","updated_at":"2015-08-13T13:52:51Z","closed_at":null,"body":"I wanted to use this cookbook to just install the zookeeper libraries, so just added \"recipe[zookeeper::install]\".  Attempting to cook a server I get the following error:\r\n\r\n NoMethodError\r\n  -------------\r\n  undefined method `map' for false:FalseClass\r\n\r\n  Cookbook Trace:\r\n  ---------------\r\n    /home/me/chef-solo/cookbooks-2/magic/libraries/configuration.rb:70:in `exports_config'\r\n    /home/me/chef-solo/cookbooks-2/zookeeper/recipes/install.rb:46:in `block in from_file'\r\n    /home/me/chef-solo/cookbooks-2/zookeeper/recipes/install.rb:44:in `from_file'\r\n    /home/me/chef-solo/cookbooks-2/zookeeper/recipes/default.rb:18:in `from_file'\r\n\r\n  Relevant File Content:\r\n  ----------------------\r\n  /home/me/chef-solo/cookbooks-2/magic/libraries/configuration.rb:\r\n\r\n   63:    def exports_raw_config obj\r\n   64:      obj.map do |k, v|\r\n   65:        \"export #{k}=#{Shellwords.escape v.to_s}\"\r\n   66:      end.join(\"\\n\")\r\n   67:    end\r\n   68:\r\n   69:    def exports_config obj\r\n   70>>     obj.map do |k, v|\r\n   71:        \"export #{k}=#{Shellwords.escape v.to_s}\"\r\n   72:      end.join(\"\\n\")\r\n   73:    end\r\n   74:\r\n   75:    def ini_config obj\r\n   76:      obj.map do |name, config|\r\n   77:        \"[#{name}]\\n\" + \\\r\n   78:        config.map do |k, v|\r\n   79:          \"#{k}=#{v}\"\r\n\r\nThe only place exports_config is used in the zookeeper config is in install.rb:\r\n\r\n    # Add optional Zookeeper environment vars\r\n    file \"#{node[:zookeeper][:config_dir]}/zookeeper-env.sh\" do\r\n      owner node[:zookeeper][:user]\r\n      content exports_config node[:zookeeper][:env_vars]\r\n      only_if { node[:zookeeper][:env_vars] }\r\n    end\r\n\r\nAnd node[:zookeeper][:env_vars] defaults to false.  I am not setting it anywhere else.\r\n\r\nAny idea what's going on here?\r\n"},"comment":{"url":"https://api.github.com/repos/SimpleFinance/chef-zookeeper/issues/comments/130680621","html_url":"https://github.com/SimpleFinance/chef-zookeeper/issues/141#issuecomment-130680621","issue_url":"https://api.github.com/repos/SimpleFinance/chef-zookeeper/issues/141","id":130680621,"user":{"login":"jeffbyrnes","id":260553,"avatar_url":"https://avatars.githubusercontent.com/u/260553?v=3","gravatar_id":"","url":"https://api.github.com/users/jeffbyrnes","html_url":"https://github.com/jeffbyrnes","followers_url":"https://api.github.com/users/jeffbyrnes/followers","following_url":"https://api.github.com/users/jeffbyrnes/following{/other_user}","gists_url":"https://api.github.com/users/jeffbyrnes/gists{/gist_id}","starred_url":"https://api.github.com/users/jeffbyrnes/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jeffbyrnes/subscriptions","organizations_url":"https://api.github.com/users/jeffbyrnes/orgs","repos_url":"https://api.github.com/users/jeffbyrnes/repos","events_url":"https://api.github.com/users/jeffbyrnes/events{/privacy}","received_events_url":"https://api.github.com/users/jeffbyrnes/received_events","type":"User","site_admin":false},"created_at":"2015-08-13T13:52:51Z","updated_at":"2015-08-13T13:52:51Z","body":"Yeah, I neglected to test with the default attributes settings, just tested setting the attributes in `.kitchen.yml`. I’ll test with the default settings, and rectify what is clearly a bug you’ve found."}}