Adoptable Cookbooks List

Looking for a cookbook to adopt? You can now see a list of cookbooks available for adoption!
List of Adoptable Cookbooks

Supermarket Belongs to the Community

Supermarket belongs to the community. While Chef has the responsibility to keep it running and be stewards of its functionality, what it does and how it works is driven by the community. The chef/supermarket repository will continue to be where development of the Supermarket application takes place. Come be part of shaping the direction of Supermarket by opening issues and pull requests or by joining us on the Chef Mailing List.

Select Badges

Select Supported Platforms

RSS

eldap (3) Versions 0.1.0

Cookbook which provides resources to perfom searches on LDAP

Berkshelf/Librarian
Policyfile
Knife
cookbook 'eldap', '= 0.1.0'
cookbook 'eldap', '= 0.1.0', :supermarket
knife cookbook site install eldap
knife cookbook site download eldap
README
Dependencies
Quality 29%

eldap

eldap cookbook helps you querying information from LDAP to work with your cookbook.

TODO: Create a better testing scripts

Usage

Your need to create at least 3 "resources": eldap_connection, eldap (action :search) and eldap_execute. Note that the name of the resource will be used on eldap's conn_name attribute.

eldap_connection resource

First of all, set your connection: eldap_connection "ldap-example" do host ldap.mycompany.com port 389 auth_method 'simple' auth_username 'cn=manager,dc=mycompany,dc=com' auth_password 'Password1' end Or set the attributes: {"eldap" : "host" : "ldap.mycompany.com", "port" : 389, "auth": { "method" : "simple", "username" : "cn=manager,dc=mycompany,dc=com", "password" : "Password1" } } And use just set the connction name to use the default settings: eldap_connection "ldap-example"

eldap resource

Set the eldap (action :search) with a property name (this name will be used by other resources like eldap_execute and eldap_dump_results_from):

  • The 'conn_name' is the same name of the eldap_connection's resource name you set.
  • The 'search' is the filter which you're looking for.
  • The 'fields' are the properties you want to retrieve
eldap "search_username" do
  conn_name "ldap-example"
  basedn 'ou=users,dc=mycompany,dc=com'
  search [['cn', :eq, 'user*']]
  fields ['cn', 'homedirectory']
  action :search
end

For the future...

Include more actions like :create, :delete, :update

eldap_execute resource

This is the way you iterate through the results of the LDAP search.

  • NOTE: Use the same eldap resource name in order to get the results from that search.
eldap_execute "search_username" do |result|
  execute "#{result.inspect.to_s.gsub(/\s/,'_')}" do
    command "echo '#{result.inspect}'"
  end
end

eldap_template resource

This is a template-like resource, but it contains the LDAP search results pre-populated. the resource name must be the name of the eldap (action :search) resource. All the results will be stored in @ldap variable. To print the details, use <%=@ldap.inspect %>

  • NOTE: Use the same eldap resource name in order to get the results from that search.
eldap_template "search_username" do
  source "eldap.erb"
  path "/tmp/eldap"
  mode '0777'
  owner 'root'
  variables ({ extra_info: :simple_value })
end

eldap_dump_results_from resource

As the name says, it prints the results of a search in Chef's output (Log.warn).

  • NOTE: Use the same eldap resource name in order to get the results from that search.
eldap_dump_results_from "search-user"

Dependent cookbooks

openldap ~> 3.0.3

Contingent cookbooks

There are no cookbooks that are contingent upon this one.

Collaborator Number Metric
            

0.1.0 failed this metric

Failure: Cookbook has 0 collaborators. A cookbook must have at least 2 collaborators to pass this metric.

Contributing File Metric
            

0.1.0 failed this metric

Failure: To pass this metric, your cookbook metadata must include a source url, the source url must be in the form of https://github.com/user/repo, and your repo must contain a CONTRIBUTING.md file

License Metric
            

0.1.0 passed this metric

Publish Metric
            

0.1.0 passed this metric

Supported Platforms Metric
            

0.1.0 failed this metric

eldap should declare what platform(s) it supports.

Testing File Metric
            

0.1.0 failed this metric

Failure: To pass this metric, your cookbook metadata must include a source url, the source url must be in the form of https://github.com/user/repo, and your repo must contain a TESTING.md file

Version Tag Metric
            

0.1.0 failed this metric

Failure: To pass this metric, your cookbook metadata must include a source url, the source url must be in the form of https://github.com/user/repo, and your repo must include a tag that matches this cookbook version number