Open
Description
I'm having trouble setting a database to readonly using the olc provider. It seems whatever value I set the database property to I'm unable to make this test true:
Am I missing something? Locally I've done this little hack to make it work, but it doesn't look like the right solution:
--- a/lib/puppet/provider/openldap_database/olc.rb
+++ b/lib/puppet/provider/openldap_database/olc.rb
@@ -228,7 +228,7 @@ Puppet::Type.
end
t << "olcRootDN: #{resource[:rootdn]}\n" if resource[:rootdn]
t << "olcRootPW: #{resource[:rootpw]}\n" if resource[:rootpw]
- t << "olcReadOnly: #{resource[:readonly] == :true ? 'TRUE' : 'FALSE'}\n" if resource[:readonly]
+ t << "olcReadOnly: #{resource[:readonly] == 'TRUE' ? 'TRUE' : 'FALSE'}\n" if resource[:readonly]
t << "olcSizeLimit: #{resource[:sizelimit]}\n" if resource[:sizelimit]
t << "olcDbMaxSize: #{resource[:dbmaxsize]}\n" if resource[:dbmaxsize]
t << "olcTimeLimit: #{resource[:timelimit]}\n" if resource[:timelimit]
@@ -364,7 +364,7 @@ Puppet::Type.
t << "replace: olcRootPW\nolcRootPW: #{resource[:rootpw]}\n-\n" if @property_flush[:rootpw]
t << "replace: olcSuffix\nolcSuffix: #{resource[:suffix]}\n-\n" if @property_flush[:suffix]
t << "replace: olcRelay\nolcRelay: #{resource[:relay]}\n-\n" if @property_flush[:relay]
- t << "replace: olcReadOnly\nolcReadOnly: #{resource[:readonly] == :true ? 'TRUE' : 'FALSE'}\n-\n" if @property_flush[:readonly]
+ t << "replace: olcReadOnly\nolcReadOnly: #{resource[:readonly] == 'TRUE' ? 'TRUE' : 'FALSE'}\n-\n" if @property_flush[:readonly]
t << "replace: olcSizeLimit\nolcSizeLimit: #{resource[:sizelimit]}\n-\n" if @property_flush[:sizelimit]
t << "replace: olcTimeLimit\nolcTimeLimit: #{resource[:timelimit]}\n-\n" if @property_flush[:timelimit]
t << "replace: olcDbMaxSize\nolcDbMaxSize: #{resource[:dbmaxsize]}\n-\n" if @property_flush[:dbmaxsize]
I'm thinking the property probably needs to be defined as a boolean, similar to mirrormode has been done.
Metadata
Metadata
Assignees
Labels
No labels