Skip to content

Commit

Permalink
Merge pull request #1 from Poil/cn-case-insensitive
Browse files Browse the repository at this point in the history
cn can be in uppercase
  • Loading branch information
Poil authored Mar 28, 2017
2 parents c93a38c + e8671fd commit 8bda711
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions lib/puppet/provider/openldap_database/olc.rb
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ def self.instances
paragraph.gsub("\n ", "").split("\n").collect do |line|
case line
when /^olcDatabase: /
index, backend = line.match(/^olcDatabase: \{(\d+)\}(bdb|hdb|mdb|monitor|config|relay)$/).captures
index, backend = line.match(/^olcDatabase: \{(\d+)\}(bdb|hdb|mdb|monitor|config|relay)$/i).captures
when /^olcDbDirectory: /
directory = line.split(' ')[1]
when /^olcRootDN: /
Expand Down Expand Up @@ -98,11 +98,11 @@ def self.instances
end
end
end
if backend == 'monitor' and !suffix
suffix = 'cn=monitor'
if backend.match(/monitor/i) and !suffix
suffix = "cn=#{backend}"
end
if backend == 'config' and !suffix
suffix = 'cn=config'
if backend.match(/config/i) and !suffix
suffix = "cn=#{backend}"
end
new(
:ensure => :present,
Expand Down

0 comments on commit 8bda711

Please sign in to comment.