{"action":"created","issue":{"url":"https://api.github.com/repos/datacentred/datacentred-ldap/issues/20","labels_url":"https://api.github.com/repos/datacentred/datacentred-ldap/issues/20/labels{/name}","comments_url":"https://api.github.com/repos/datacentred/datacentred-ldap/issues/20/comments","events_url":"https://api.github.com/repos/datacentred/datacentred-ldap/issues/20/events","html_url":"https://github.com/datacentred/datacentred-ldap/issues/20","id":34466243,"number":20,"title":"ldap_entry seems to be broken?","user":{"login":"duronrulez","id":981088,"avatar_url":"https://avatars.githubusercontent.com/u/981088?v=3","gravatar_id":"","url":"https://api.github.com/users/duronrulez","html_url":"https://github.com/duronrulez","followers_url":"https://api.github.com/users/duronrulez/followers","following_url":"https://api.github.com/users/duronrulez/following{/other_user}","gists_url":"https://api.github.com/users/duronrulez/gists{/gist_id}","starred_url":"https://api.github.com/users/duronrulez/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/duronrulez/subscriptions","organizations_url":"https://api.github.com/users/duronrulez/orgs","repos_url":"https://api.github.com/users/duronrulez/repos","events_url":"https://api.github.com/users/duronrulez/events{/privacy}","received_events_url":"https://api.github.com/users/duronrulez/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/datacentred/datacentred-ldap/labels/bug","name":"bug","color":"fc2929"}],"state":"closed","locked":false,"assignee":{"login":"seanhandley","id":98526,"avatar_url":"https://avatars.githubusercontent.com/u/98526?v=3","gravatar_id":"","url":"https://api.github.com/users/seanhandley","html_url":"https://github.com/seanhandley","followers_url":"https://api.github.com/users/seanhandley/followers","following_url":"https://api.github.com/users/seanhandley/following{/other_user}","gists_url":"https://api.github.com/users/seanhandley/gists{/gist_id}","starred_url":"https://api.github.com/users/seanhandley/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/seanhandley/subscriptions","organizations_url":"https://api.github.com/users/seanhandley/orgs","repos_url":"https://api.github.com/users/seanhandley/repos","events_url":"https://api.github.com/users/seanhandley/events{/privacy}","received_events_url":"https://api.github.com/users/seanhandley/received_events","type":"User","site_admin":false},"milestone":null,"comments":27,"created_at":"2014-05-28T13:32:54Z","updated_at":"2015-03-22T19:55:18Z","closed_at":"2014-05-28T18:48:08Z","body":"Hello\r\n\r\nI am trying to use the ldap_entry provided by the module, but it seems to be broken:\r\n\r\n```\r\nError: /Stage[main]/Main/Node[bastion]/Ldap_entry[cn=Baz,ou=Bar,dc=baz,dc=co,dc=uk]: Could not evaluate: undefined method `keys' for nil:NilClass\r\n\r\nError: /Stage[main]/Main/Node[bastion]/Ldap_entry[cn=Foo,ou=Bar,dc=baz,dc=co,dc=uk]: Could not evaluate: uninitialized constant Net::LDAP\r\n```\r\n\r\nThis is my .pp file:\r\n```\r\n\r\nclass { 'ldap::server':\r\n          suffix => 'dc=example,dc=com',\r\n          rootdn => 'cn=admin,dc=example,dc=com',\r\n          rootpw => hiera('ldapServerDbPassword'),\r\n          ssl => false\r\n        }\r\n\r\nldap_entry { 'cn=Foo,ou=Bar,dc=baz,dc=co,dc=uk':\r\n          ensure      => present,\r\n          host        => '1.2.3.4',\r\n          port        => 636,\r\n          base        => 'dc=baz,dc=co,dc=uk',\r\n          username    => 'cn=admin,dc=baz,dc=co,dc=uk',\r\n          password    => 'password',\r\n          attributes  => { givenName   => 'Foo',\r\n                 objectClass => [\"top\", \"person\", \"inetorgPerson\"]\r\n          }\r\n        }\r\n\r\n        ldap_entry { 'cn=Baz,ou=Bar,dc=baz,dc=co,dc=uk':\r\n          ensure      => absent,\r\n          base        => 'dc=baz,dc=co,dc=uk',\r\n          host        => '1.2.3.4',\r\n          username    => 'cn=admin,dc=baz,dc=co,dc=uk',\r\n          password    => 'password',\r\n        }\r\n```\r\n\r\nTrace Exception:\r\n```\r\nError: /Stage[main]/Main/Node[bastion]/Ldap_entry[cn=Baz,ou=Bar,dc=baz,dc=co,dc=uk]: Could not evaluate: undefined method `keys' for nil:NilClass\r\n/var/lib/puppet/lib/puppet/provider/ldap_entry/ldap.rb:60:in `attributes'\r\n/var/lib/puppet/lib/puppet/provider/ldap_entry/ldap.rb:10:in `exists?'\r\n/usr/lib/ruby/vendor_ruby/puppet/property/ensure.rb:81:in `retrieve'\r\n/usr/lib/ruby/vendor_ruby/puppet/type.rb:1035:in `retrieve'\r\n/usr/lib/ruby/vendor_ruby/puppet/type.rb:1063:in `retrieve_resource'\r\n/usr/lib/ruby/vendor_ruby/puppet/transaction/resource_harness.rb:223:in `from_resource'\r\n/usr/lib/ruby/vendor_ruby/puppet/transaction/resource_harness.rb:19:in `evaluate'\r\n/usr/lib/ruby/vendor_ruby/puppet/transaction.rb:174:in `apply'\r\n/usr/lib/ruby/vendor_ruby/puppet/transaction.rb:187:in `eval_resource'\r\n/usr/lib/ruby/vendor_ruby/puppet/transaction.rb:117:in `call'\r\n/usr/lib/ruby/vendor_ruby/puppet/transaction.rb:117:in `block (2 levels) in evaluate'\r\n/usr/lib/ruby/vendor_ruby/puppet/util.rb:327:in `block in thinmark'\r\n/usr/lib/ruby/1.9.1/benchmark.rb:295:in `realtime'\r\n/usr/lib/ruby/vendor_ruby/puppet/util.rb:326:in `thinmark'\r\n/usr/lib/ruby/vendor_ruby/puppet/transaction.rb:117:in `block in evaluate'\r\n/usr/lib/ruby/vendor_ruby/puppet/graph/relationship_graph.rb:118:in `traverse'\r\n/usr/lib/ruby/vendor_ruby/puppet/transaction.rb:108:in `evaluate'\r\n/usr/lib/ruby/vendor_ruby/puppet/resource/catalog.rb:164:in `block in apply'\r\n/usr/lib/ruby/vendor_ruby/puppet/util/log.rb:149:in `with_destination'\r\n/usr/lib/ruby/vendor_ruby/puppet/transaction/report.rb:108:in `as_logging_destination'\r\n/usr/lib/ruby/vendor_ruby/puppet/resource/catalog.rb:163:in `apply'\r\n/usr/lib/ruby/vendor_ruby/puppet/configurer.rb:125:in `block in apply_catalog'\r\n/usr/lib/ruby/vendor_ruby/puppet/util.rb:161:in `block in benchmark'\r\n/usr/lib/ruby/1.9.1/benchmark.rb:295:in `realtime'\r\n/usr/lib/ruby/vendor_ruby/puppet/util.rb:160:in `benchmark'\r\n/usr/lib/ruby/vendor_ruby/puppet/configurer.rb:124:in `apply_catalog'\r\n/usr/lib/ruby/vendor_ruby/puppet/configurer.rb:192:in `run'\r\n/usr/lib/ruby/vendor_ruby/puppet/agent.rb:44:in `block (4 levels) in run'\r\n/usr/lib/ruby/vendor_ruby/puppet/agent/locker.rb:20:in `lock'\r\n/usr/lib/ruby/vendor_ruby/puppet/agent.rb:44:in `block (3 levels) in run'\r\n/usr/lib/ruby/vendor_ruby/puppet/agent.rb:114:in `with_client'\r\n/usr/lib/ruby/vendor_ruby/puppet/agent.rb:41:in `block (2 levels) in run'\r\n/usr/lib/ruby/vendor_ruby/puppet/agent.rb:79:in `run_in_fork'\r\n/usr/lib/ruby/vendor_ruby/puppet/agent.rb:40:in `block in run'\r\n/usr/lib/ruby/vendor_ruby/puppet/application.rb:179:in `call'\r\n/usr/lib/ruby/vendor_ruby/puppet/application.rb:179:in `controlled_run'\r\n/usr/lib/ruby/vendor_ruby/puppet/agent.rb:38:in `run'\r\n/usr/lib/ruby/vendor_ruby/puppet/application/agent.rb:355:in `onetime'\r\n/usr/lib/ruby/vendor_ruby/puppet/application/agent.rb:321:in `run_command'\r\n/usr/lib/ruby/vendor_ruby/puppet/application.rb:364:in `block (2 levels) in run'\r\n/usr/lib/ruby/vendor_ruby/puppet/application.rb:470:in `plugin_hook'\r\n/usr/lib/ruby/vendor_ruby/puppet/application.rb:364:in `block in run'\r\n/usr/lib/ruby/vendor_ruby/puppet/util.rb:478:in `exit_on_fail'\r\n/usr/lib/ruby/vendor_ruby/puppet/application.rb:364:in `run'\r\n/usr/lib/ruby/vendor_ruby/puppet/util/command_line.rb:137:in `run'\r\n/usr/lib/ruby/vendor_ruby/puppet/util/command_line.rb:91:in `execute'\r\n/usr/bin/puppet:4:in `<main>'\r\nError: /Stage[main]/Main/Node[bastion]/Ldap_entry[cn=Foo,ou=Bar,dc=baz,dc=co,dc=uk]: Could not evaluate: uninitialized constant Net::LDAP\r\n/var/lib/puppet/lib/puppet/provider/ldap_entry/ldap.rb:113:in `ldap'\r\n/var/lib/puppet/lib/puppet/provider/ldap_entry/ldap.rb:70:in `ldap_search'\r\n/var/lib/puppet/lib/puppet/provider/ldap_entry/ldap.rb:10:in `exists?'\r\n/usr/lib/ruby/vendor_ruby/puppet/property/ensure.rb:81:in `retrieve'\r\n/usr/lib/ruby/vendor_ruby/puppet/type.rb:1035:in `retrieve'\r\n/usr/lib/ruby/vendor_ruby/puppet/type.rb:1063:in `retrieve_resource'\r\n/usr/lib/ruby/vendor_ruby/puppet/transaction/resource_harness.rb:223:in `from_resource'\r\n/usr/lib/ruby/vendor_ruby/puppet/transaction/resource_harness.rb:19:in `evaluate'\r\n/usr/lib/ruby/vendor_ruby/puppet/transaction.rb:174:in `apply'\r\n/usr/lib/ruby/vendor_ruby/puppet/transaction.rb:187:in `eval_resource'\r\n/usr/lib/ruby/vendor_ruby/puppet/transaction.rb:117:in `call'\r\n/usr/lib/ruby/vendor_ruby/puppet/transaction.rb:117:in `block (2 levels) in evaluate'\r\n/usr/lib/ruby/vendor_ruby/puppet/util.rb:327:in `block in thinmark'\r\n/usr/lib/ruby/1.9.1/benchmark.rb:295:in `realtime'\r\n/usr/lib/ruby/vendor_ruby/puppet/util.rb:326:in `thinmark'\r\n/usr/lib/ruby/vendor_ruby/puppet/transaction.rb:117:in `block in evaluate'\r\n/usr/lib/ruby/vendor_ruby/puppet/graph/relationship_graph.rb:118:in `traverse'\r\n/usr/lib/ruby/vendor_ruby/puppet/transaction.rb:108:in `evaluate'\r\n/usr/lib/ruby/vendor_ruby/puppet/resource/catalog.rb:164:in `block in apply'\r\n/usr/lib/ruby/vendor_ruby/puppet/util/log.rb:149:in `with_destination'\r\n/usr/lib/ruby/vendor_ruby/puppet/transaction/report.rb:108:in `as_logging_destination'\r\n/usr/lib/ruby/vendor_ruby/puppet/resource/catalog.rb:163:in `apply'\r\n/usr/lib/ruby/vendor_ruby/puppet/configurer.rb:125:in `block in apply_catalog'\r\n/usr/lib/ruby/vendor_ruby/puppet/util.rb:161:in `block in benchmark'\r\n/usr/lib/ruby/1.9.1/benchmark.rb:295:in `realtime'\r\n/usr/lib/ruby/vendor_ruby/puppet/util.rb:160:in `benchmark'\r\n/usr/lib/ruby/vendor_ruby/puppet/configurer.rb:124:in `apply_catalog'\r\n/usr/lib/ruby/vendor_ruby/puppet/configurer.rb:192:in `run'\r\n/usr/lib/ruby/vendor_ruby/puppet/agent.rb:44:in `block (4 levels) in run'\r\n/usr/lib/ruby/vendor_ruby/puppet/agent/locker.rb:20:in `lock'\r\n/usr/lib/ruby/vendor_ruby/puppet/agent.rb:44:in `block (3 levels) in run'\r\n/usr/lib/ruby/vendor_ruby/puppet/agent.rb:114:in `with_client'\r\n/usr/lib/ruby/vendor_ruby/puppet/agent.rb:41:in `block (2 levels) in run'\r\n/usr/lib/ruby/vendor_ruby/puppet/agent.rb:79:in `run_in_fork'\r\n/usr/lib/ruby/vendor_ruby/puppet/agent.rb:40:in `block in run'\r\n/usr/lib/ruby/vendor_ruby/puppet/application.rb:179:in `call'\r\n/usr/lib/ruby/vendor_ruby/puppet/application.rb:179:in `controlled_run'\r\n/usr/lib/ruby/vendor_ruby/puppet/agent.rb:38:in `run'\r\n/usr/lib/ruby/vendor_ruby/puppet/application/agent.rb:355:in `onetime'\r\n/usr/lib/ruby/vendor_ruby/puppet/application/agent.rb:321:in `run_command'\r\n/usr/lib/ruby/vendor_ruby/puppet/application.rb:364:in `block (2 levels) in run'\r\n/usr/lib/ruby/vendor_ruby/puppet/application.rb:470:in `plugin_hook'\r\n/usr/lib/ruby/vendor_ruby/puppet/application.rb:364:in `block in run'\r\n/usr/lib/ruby/vendor_ruby/puppet/util.rb:478:in `exit_on_fail'\r\n/usr/lib/ruby/vendor_ruby/puppet/application.rb:364:in `run'\r\n/usr/lib/ruby/vendor_ruby/puppet/util/command_line.rb:137:in `run'\r\n/usr/lib/ruby/vendor_ruby/puppet/util/command_line.rb:91:in `execute'\r\n/usr/bin/puppet:4:in `<main>'\r\n```\r\nPuppet version - 3.4.3\r\nOS - Ubuntu 14.04\r\n\r\n\r\nThe configuraiton of the .pp is pretty much a copy from the example page."},"comment":{"url":"https://api.github.com/repos/datacentred/datacentred-ldap/issues/comments/84687822","html_url":"https://github.com/datacentred/datacentred-ldap/issues/20#issuecomment-84687822","issue_url":"https://api.github.com/repos/datacentred/datacentred-ldap/issues/20","id":84687822,"user":{"login":"feature-","id":8492360,"avatar_url":"https://avatars.githubusercontent.com/u/8492360?v=3","gravatar_id":"","url":"https://api.github.com/users/feature-","html_url":"https://github.com/feature-","followers_url":"https://api.github.com/users/feature-/followers","following_url":"https://api.github.com/users/feature-/following{/other_user}","gists_url":"https://api.github.com/users/feature-/gists{/gist_id}","starred_url":"https://api.github.com/users/feature-/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/feature-/subscriptions","organizations_url":"https://api.github.com/users/feature-/orgs","repos_url":"https://api.github.com/users/feature-/repos","events_url":"https://api.github.com/users/feature-/events{/privacy}","received_events_url":"https://api.github.com/users/feature-/received_events","type":"User","site_admin":false},"created_at":"2015-03-22T19:55:18Z","updated_at":"2015-03-22T19:55:18Z","body":"@seanhandley 3.6.2"}}