backend provision samba4-ol-multimaster working
Oliver Liebel
oliver at itc.li
Mon Aug 18 11:55:34 GMT 2008
Oliver Liebel schrieb:
> Andrew Bartlett schrieb:
>> Rather than use python string concatenation and appending writes, like
>> the memberOf code does, read in the teamplate and use it to sub the
>> variables. (and then place that into the main config file multiple
>> times, by means of a very long variable)
>>
> okay, i will try to move the setup to make use of templating.
> but to do this, please provide me just one little working example (i
> think the block/template of the
> serverids and corresponding ldap-urls wil be a good point to start on
> it, as there will be
> a various count too) and i will then try to adapt the procedure for
> the syncrepl-blocks.
>
.... no need for an example at the moment;
i figured it out myself, and the serverid-block is working now for
n-servers.
but please take a short look on it, if its okay the way i made it,
before i start to setup the syncrepl-blocks:
in provision.py:
if ol_mmr_urls is not None:
mmr_hosts=ol_mmr_urls
mmr_hosts=filter(None,mmr_hosts.split(' '))
mmr_serverids_config = "# Generated from template
mmr_serverids.conf\n"
z=0
for i in mmr_hosts:
z=z+1
mmr_serverids_config +=
read_and_sub_file(setup_path("mmr_serverids.conf"),
{
"SERVERID" : str(z),
"LDAPSERVER" : i })
------------
mmr_serverids.conf:
ServerID ${SERVERID} ${LDAPSERVER}
----------
slapd.conf:
${MMR_SERVERIDS_CONFIG}
____________
Virus checked by G DATA AntiVirusKit
Version: AVK 18.5042 from 18.08.2008
Virus news: www.antiviruslab.com
More information about the samba-technical
mailing list