Giter VIP home page Giter VIP logo

Comments (3)

mcanevet avatar mcanevet commented on June 16, 2024

@tverhoeven could you please provide the puppet code you are using so that I can try to reproduce?

from puppet-openldap.

tverhoeven avatar tverhoeven commented on June 16, 2024

Here is the code:

  #Variables
  if $::fqdn == 'servera01' {
    $serverid = '1 ldap://servera01/'
  } elsif $::fqdn == 'servera02' {
    $serverid = '2 ldap://servera02/'
  }

  # Setup openldap server and 2 trees
  class { 'openldap::server':
    databases => {
      'dc=tree1' => {
        directory  => '/var/lib/ldap/tree1',
        rootdn     => 'cn=Manager,dc=tree1',
        rootpw     => 'password',
        syncrepl   => ["rid=001 provider=ldap://servera01:389 binddn=\"cn=Manager,dc=tree1\" bindmethod=simple credentials=password searchbase=\"dc=tree1\" type=refreshAndPersist", "rid=002 provider=ldap://servera02:389 binddn=\"cn=Manager,dc=tree1\" bindmethod=simple credentials=password searchbase=\"dc=tree1\" type=refreshAndPersist"],
        initdb     => true,
        mirrormode => true,
      },
      'dc=tree2' => {
        directory  => '/var/lib/ldap/tree2',
        rootdn     => 'cn=Manager,dc=tree2',
        rootpw     => 'password',
        syncrepl   => ["rid=001 provider=ldap://servera01:389 binddn=\"cn=Manager,dc=tree2\" bindmethod=simple credentials=password searchbase=\"dc=tree2\" type=refreshAndPersist", "rid=002 provider=ldap://servera02:389 binddn=\"cn=Manager,dc=tree2\" bindmethod=simple credentials=password searchbase=\"dc=tree2\" type=refreshAndPersist"],
        initdb     => true,
        mirrormode => true,
      },
    },
  }

  # Add serverid to global conf for replication
  openldap::server::globalconf { 'serverid':
    ensure => present,
    value  => "${serverid}",
  }

The variable section is also used for other parameters (e.g. keepalived). I also have some overlay (for the replication) and schema's resources to complete the setup. Let me know if you also would need those.

from puppet-openldap.

tverhoeven avatar tverhoeven commented on June 16, 2024

I've manage to solve the problem.

I was adding a couple of other globalconf entries, this to setup TLS. And these worked fine. So I thought there is something to the way serverid's handled. But looking at the code this isn't the case.

Then looking again at my manifest I've spotted the problem. The TLS parameters in my manifest were capitalized exactly like they appear in the cn=config. By my serverid entry in my manifest was not. So I changed the capitalization of the ServerID entry in my manifest and then the error disappeared.

So the moral of the story is that the documentation should contain a note that globalconf entries should be capitalized exactly as how they appear in cn=config.

from puppet-openldap.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.