{"action":"created","issue":{"url":"https://api.github.com/repos/venmo/puppet-consulr/issues/4","labels_url":"https://api.github.com/repos/venmo/puppet-consulr/issues/4/labels{/name}","comments_url":"https://api.github.com/repos/venmo/puppet-consulr/issues/4/comments","events_url":"https://api.github.com/repos/venmo/puppet-consulr/issues/4/events","html_url":"https://github.com/venmo/puppet-consulr/issues/4","id":111054036,"number":4,"title":"Hash is not working","user":{"login":"srjayep","id":8960810,"avatar_url":"https://avatars.githubusercontent.com/u/8960810?v=3","gravatar_id":"","url":"https://api.github.com/users/srjayep","html_url":"https://github.com/srjayep","followers_url":"https://api.github.com/users/srjayep/followers","following_url":"https://api.github.com/users/srjayep/following{/other_user}","gists_url":"https://api.github.com/users/srjayep/gists{/gist_id}","starred_url":"https://api.github.com/users/srjayep/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/srjayep/subscriptions","organizations_url":"https://api.github.com/users/srjayep/orgs","repos_url":"https://api.github.com/users/srjayep/repos","events_url":"https://api.github.com/users/srjayep/events{/privacy}","received_events_url":"https://api.github.com/users/srjayep/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":5,"created_at":"2015-10-12T20:54:18Z","updated_at":"2015-10-12T21:40:57Z","closed_at":null,"body":"Having issues with Hash value. My puppet module compiles without error when I don't use hash key but results are different. \r\n\r\nError when using as below.\r\nsite.pp\r\n--------\r\n$consulr_kv = consulr_kv({\r\n  'facter_prefix' => 'hostname',\r\n  'value_only'    => true,\r\n})\r\ninstall.pp\r\n------------\r\nif $::consulr_kv['rsync-version'] == '3.0.6-12' {\r\n  package {'rsync': ensure => '3.0.6-12' }\r\n} else {\r\npackage { 'rsync': ensure => installed }\r\n}\r\n\r\nError: ::consulr_kv is not a hash or array when accessing  it with rsync-version at install.pp:29 on node test.localdomain.\r\n\r\nHere is the result of $::consulr_kv \r\nconsulr_kv = {\"nodes/test.localdomain/rsync-version\"=>\"3.0.6-12\", \"rsync-version\"=>\"3.0.6-12\"}\r\n\r\nKV store values. \r\n\r\ncurl http://localhost:8500/v1/kv/nodes/test.localdomain/?recurse\r\n[{\"CreateIndex\":346,\"ModifyIndex\":346,\"LockIndex\":0,\"Key\":\"nodes/test.localdomain/rsync-version\",\"Flags\":0,\"Value\":\"My4wLjYtMTI=\"}]\r\n\r\nAppreciate your help !\r\n"},"comment":{"url":"https://api.github.com/repos/venmo/puppet-consulr/issues/comments/147529529","html_url":"https://github.com/venmo/puppet-consulr/issues/4#issuecomment-147529529","issue_url":"https://api.github.com/repos/venmo/puppet-consulr/issues/4","id":147529529,"user":{"login":"srjayep","id":8960810,"avatar_url":"https://avatars.githubusercontent.com/u/8960810?v=3","gravatar_id":"","url":"https://api.github.com/users/srjayep","html_url":"https://github.com/srjayep","followers_url":"https://api.github.com/users/srjayep/followers","following_url":"https://api.github.com/users/srjayep/following{/other_user}","gists_url":"https://api.github.com/users/srjayep/gists{/gist_id}","starred_url":"https://api.github.com/users/srjayep/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/srjayep/subscriptions","organizations_url":"https://api.github.com/users/srjayep/orgs","repos_url":"https://api.github.com/users/srjayep/repos","events_url":"https://api.github.com/users/srjayep/events{/privacy}","received_events_url":"https://api.github.com/users/srjayep/received_events","type":"User","site_admin":false},"created_at":"2015-10-12T21:40:57Z","updated_at":"2015-10-12T21:40:57Z","body":"No luck with 0.5.2...I am also looking into it , trying debug....I have inserted print statements in funciton and resulted the following...Is it something you see right?\r\n\r\n==> default: sree printing required_config: []\r\n==> default: sree printing user_config : {}\r\n==> default: sree printing config : {\"uri\"=>\"http://localhost:8500\", \"nodes_prefix\"=>\"nodes\", \"facter_prefix\"=>\"hostname\", \"value_only\"=>true, \"base64_decode\"=>true, \"ignore_404\"=>true, \"token\"=>false, \"timeout\"=>5}\r\n==> default: sree printing missing_config: []\r\n==> default: sree printing prefix : test\r\n==> default: sree printing consulr: {}\r\n==> default: sree printing build_uri1 : http://localhost:8500/v1/kv/nodes/test?recurse\r\n==> default: sree printing build_urii2 : http://localhost:8500/v1/kv/nodes/test?recurse\r\n==> default: sree printing response : #<Net::HTTPOK:0x000000025ab548>\r\n==> default: sree printing data : [{\"CreateIndex\"=>346, \"ModifyIndex\"=>346, \"LockIndex\"=>0, \"Key\"=>\"nodes/test.localdomain/rsync-version\", \"Flags\"=>0, \"Value\"=>\"My4wLjYtMTI=\"}, {\"CreateIndex\"=>342, \"ModifyIndex\"=>342, \"LockIndex\"=>0, \"Key\"=>\"nodes/test/rsync-version\", \"Flags\"=>0, \"Value\"=>\"My4wLjYtMTI=\"}]\r\n==> default: sree printing result if true : 3.0.6-12\r\n==> default: sree printing result at end : 3.0.6-12\r\n==> default: sree printing result if true : 3.0.6-12\r\n==> default: sree printing result at end : 3.0.6-12\r\n==> default: Sree returning consulr: {\"nodes/test.localdomain/rsync-version\"=>\"3.0.6-12\", \"rsync-version\"=>\"3.0.6-12\"}\r\n"}}