Skip to content

Commit

Permalink
Add dirsrv_listen_host for issue #1
Browse files Browse the repository at this point in the history
  • Loading branch information
lvps committed Nov 15, 2019
1 parent 0fe4c74 commit 84f49da
Show file tree
Hide file tree
Showing 6 changed files with 15 additions and 0 deletions.
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,7 @@ The variables that can be passed to this role and a brief description about them
| dirsrv_serverid | default | Server ID or instance ID. All the data related to the instance configured by this role will end up in /etc/dirsrv/slapd-*default*, /var/log/dirsrv/slapd-*default*, etc... You could use your company name, e.g. for Foo Bar, Inc set the variable to `foobar` and the directories will be named slapd-foobar. | ¹ |
| dirsrv_install_examples | false | Create example entries under the suffix during installation | **No** |
| dirsrv_install_additional_ldif | [] | Install these additional LDIF files, by default none (empty array). This corresponds to the `InstallLdifFile` directive in the inf installation file. | **No** |
| dirsrv_listen_host | | Listen on these addresses/hostnames. If not set (default) does nothing, if set to a string will set the `nsslapd-listenhost` attribute. Set to `[]` to delete the attribute. | Yes |
| dirsrv_logging | see below | see below | Yes |
| dirsrv_plugins_enabled | {} | Enable or disable plugins, see below for details. By default no plugins are enabled or disabled. | Yes |
| dirsrv_dna_plugin | see below | Configuration for the DNA (Distributed Numeric Assignment) plugin. | Yes |
Expand Down
1 change: 1 addition & 0 deletions defaults/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -87,6 +87,7 @@ dirsrv_password_storage_scheme: []

dirsrv_ldapi_enabled: false
dirsrv_sasl_plain_enabled: true
dirsrv_listen_host:

# Display supported cipher suites:
# ldapsearch -xLLL -H ldap://server.example.com:389 -D "cn=Directory Manager" -W -b 'cn=encryption,cn=config' -s base nsSSLSupportedCiphers -o ldif-wrap=no dn: cn=encryption,cn=config
Expand Down
1 change: 1 addition & 0 deletions molecule/default/playbook.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,4 +8,5 @@
dirsrv_suffix: "dc=example,dc=local"
dirsrv_serverid: test
dirsrv_rootdn_password: secret
dirsrv_listen_host: 0.0.0.0
dirsrv_tls_enabled: false
1 change: 1 addition & 0 deletions molecule/other_features/playbook.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
dirsrv_password_storage_scheme: "PBKDF2_SHA256"
dirsrv_serverid: test
dirsrv_rootdn_password: secret
dirsrv_listen_host: 0.0.0.0
dirsrv_tls_enabled: false
dirsrv_install_examples: true
dirsrv_ldapi_enabled: true
Expand Down
1 change: 1 addition & 0 deletions molecule/tls/playbook.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
dirsrv_suffix: "dc=test,dc=local"
dirsrv_serverid: test
dirsrv_rootdn_password: secret
dirsrv_listen_host: 0.0.0.0
dirsrv_tls_enabled: true
dirsrv_tls_cert_file: tls_test_local_cert.pem
dirsrv_tls_key_file: tls_test_local.key
Expand Down
10 changes: 10 additions & 0 deletions tasks/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,16 @@
bind_dn: "{{ dirsrv_rootdn }}"
bind_pw: "{{ dirsrv_rootdn_password }}"

- name: Configure listen address
ldap_attr:
params: "{{ dirsrv_ldap_auth }}"
dn: "cn=config"
name: "nsslapd-listenhost"
values: "{{ dirsrv_listen_host }}"
state: exact
notify: dirsrv restart
when: dirsrv_listen_host != None

- include: configure_authentication.yml

- include: configure_logging.yml
Expand Down

0 comments on commit 84f49da

Please sign in to comment.