Skip to content

Commit

Permalink
Merge pull request #11 from falon/master
Browse files Browse the repository at this point in the history
Multiple backends and run_dir
  • Loading branch information
lvps authored Feb 17, 2021
2 parents b9558eb + 2df4d19 commit 0378f88
Show file tree
Hide file tree
Showing 4 changed files with 24 additions and 3 deletions.
2 changes: 2 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@ The variables that can be passed to this role and a brief description about them
| Variable | Default | Description | Can be changed |
|---------------------------------|----------------------|------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|----------------|
| dirsrv_suffix | dc=example,dc=com | Suffix of the DIT. All entries in the server will be placed under this suffix. Normally it's made from the domain components (*dc*) of your company main domain. E.g. if you're from example.co.uk and the server will be at ldap-server.example.co.uk, set the suffix to `dc=example,dc=co,dc=uk`, leaving out the subdomain part (`ldap-server`) since it's irrelevant. | **No** |
| dirsrv_othersuffixes | [] | List of other suffixes dicts in the form `{ name: <bename>, dn: <rootDN>}` | **No** |
| dirsrv_rootdn | cn=Directory Manager | Root DN, or "administrator" account username. Bind with this DN to bypass all authorization controls. | **No** |
| dirsrv_rootdn_password | | Password for root DN, you *must* define this variable or the role will fail. | **No** |
| dirsrv_fqdn | {{ansible_nodename}} | Server FQDN, e.g. `ldap.example.com`. If the server hostname is already an FQDN, the default should pick it up. | **No** |
Expand Down Expand Up @@ -70,6 +71,7 @@ These variables only affect on installations of 389DS version 1.4.X and have no
| dirsrv_selfsigned_cert | True² | Determines wether 389DS will generate a self-signed certificate and enable TLS automatically. | **No** |
| dirsrv_selfsigned_cert_duration | 24² | Validity in months of the self-signed certificate generated by 389DS. | **No** |
| dirsrv_create_suffix_entry | False² | Determines wether 389DS will generate a suffix entry in the directory with the given suffix: `cn={{ dirsrv_suffix }}` | **No** |
| dirsrv_rundir | | Configures a specific path for `run_dir`. | **No** |

### Interoperability between 1.3.X and 1.4.X

Expand Down
2 changes: 2 additions & 0 deletions defaults/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,8 @@
# Instance settings

dirsrv_suffix: dc=example,dc=com
dirsrv_bename: userRoot
dirsrv_othersuffixes: []
dirsrv_rootdn: cn=Directory Manager
# dirsrv_rootdn_password: secret
dirsrv_fqdn: "{{ ansible_nodename }}"
Expand Down
3 changes: 2 additions & 1 deletion templates/install-v1.inf.j2
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ SuiteSpotGroup = dirsrv
ServerPort = 389
ServerIdentifier = {{ dirsrv_serverid }}
Suffix = {{ dirsrv_suffix }}
ds_bename = {{ dirsrv_bename }}
RootDN = {{ dirsrv_rootdn }}
RootDNPwd = {{ dirsrv_rootdn_password }}
{% if dirsrv_install_examples %}
Expand All @@ -32,4 +33,4 @@ RootDNPwd = {{ dirsrv_rootdn_password }}
InstallLdifFile = /tmp/{{ file|basename }}
{% endfor %}
{% endif %}
{% endif %}
{% endif %}
20 changes: 18 additions & 2 deletions templates/install-v2.inf.j2
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,11 @@ self_sign_cert = {{ "True" if dirsrv_selfsigned_cert else "False" }}
{% if dirsrv_selfsigned_cert_duration is defined %}
self_sign_cert_valid_months = {{ dirsrv_selfsigned_cert_duration }}
{% endif %}
{% if dirsrv_rundir is defined %}
run_dir = {{ dirsrv_rundir }}
{% endif %}

[backend-userroot]
[backend-{{ dirsrv_bename }}]
{% if dirsrv_install_examples %}
sample_entries = yes
{% else %}
Expand All @@ -31,4 +34,17 @@ sample_entries = no
suffix = {{ dirsrv_suffix }}
{% if dirsrv_create_suffix_entry is defined %}
create_suffix_entry = {{ "True" if dirsrv_create_suffix_entry else "False" }}
{% endif %}
{% endif %}
{% for suffix in dirsrv_othersuffixes %}

[backend-{{ suffix.name }}]
{% if dirsrv_install_examples %}
sample_entries = yes
{% else %}
sample_entries = no
{% endif %}
suffix = {{ suffix.dn }}
{% if dirsrv_create_suffix_entry is defined %}
create_suffix_entry = {{ "True" if dirsrv_create_suffix_entry else "False" }}
{% endif %}
{% endfor %}

0 comments on commit 0378f88

Please sign in to comment.