Skip to content

Commit

Permalink
few updates after testing with ldap cookbook
Browse files Browse the repository at this point in the history
  • Loading branch information
Alan Willis committed Aug 29, 2014
1 parent 67f2641 commit 7bf47ea
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 6 deletions.
4 changes: 2 additions & 2 deletions providers/aci.rb
Original file line number Diff line number Diff line change
Expand Up @@ -119,7 +119,7 @@ def whyrun_supported?
# and ( hours );
# )

dirsrv_entry dn do
ldap_entry dn do
host new_resource.host
port new_resource.port
credentials new_resource.credentials
Expand All @@ -138,7 +138,7 @@ def whyrun_supported?

access_control_instruction = @current_resource[new_resource.label.to_s]

dirsrv_entry @current_resource[:dn] do
ldap_entry @current_resource[:dn] do
host new_resource.host
port new_resource.port
credentials new_resource.credentials
Expand Down
4 changes: 2 additions & 2 deletions providers/config.rb
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ def whyrun_supported?

converge_by("Setting #{new_resource.attr}: #{new_resource.value}") do
ldap_entry new_resource.attr do
dn 'cn=config'
distinguished_name 'cn=config'
host new_resource.host
port new_resource.port
credentials new_resource.credentials
Expand All @@ -42,7 +42,7 @@ def whyrun_supported?

converge_by("Unsetting #{new_resource.attr}") do
ldap_entry new_resource.attr do
dn 'cn=config'
distinguished_name 'cn=config'
host new_resource.host
port new_resource.port
credentials new_resource.credentials
Expand Down
2 changes: 1 addition & 1 deletion providers/instance.rb
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ def whyrun_supported?
config[:credentials] = Chef::EncryptedDataBagItem.load( new_resource.cookbook_name, config[:credentials], secret ).to_hash
end

unless config[:credentials].kind_of?(Hash) and config[:credentials].key?('userdn') and config[:credentials].key?('password')
unless config[:credentials].kind_of?(Hash) and config[:credentials].key?('bind_dn') and config[:credentials].key?('password')
raise "Invalid credentials: #{config[:credentials]}"
end

Expand Down
2 changes: 1 addition & 1 deletion templates/default/setup.inf.erb
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ SysUser = dirsrv
AddOrgEntries = <%= @add_org_entries %>
AddSampleEntries = <%= @add_sample_entries %>
InstallLdifFile = <%= @preseed_ldif %>
RootDN = <%= @credentials['userdn'] %>
RootDN = <%= @credentials['bind_dn'] %>
RootDNPwd = <%= @credentials['password'] %>
ServerIdentifier = <%= @instance %>
ServerPort = <%= @port %>
Expand Down

0 comments on commit 7bf47ea

Please sign in to comment.