openldap_server
openldap_server copied to clipboard
ldap_sasl_bind(SIMPLE): Can't contact LDAP server (-1)
Hello,
I'm facing this error :
TASK [openldap_server : add the base domain] ******************************************************************************************************************************************************************************************************************************************************************************** fatal: [hdp-master]: FAILED! => {"changed": true, "cmd": "ldapadd -x -D "cn=Manager,dc=opstake,dc=com" -w passme -f /tmp/domain.ldif && touch /etc/openldap//rootdn_created", "delta": "0:00:00.006919", "end": "2017-07-19 03:21:03.280388", "failed": true, "rc": 255, "start": "2017-07-19 03:21:03.273469", "stderr": "ldap_sasl_bind(SIMPLE): Can't contact LDAP server (-1)", "stderr_lines": ["ldap_sasl_bind(SIMPLE): Can't contact LDAP server (-1)"], "stdout": "", "stdout_lines": []}
- CentOS Linux release 7.3.1611 (Core)
- ansible 2.3.1.0 config file = /etc/ansible/ansible.cfg configured module search path = Default w/o overrides python version = 2.7.5 (default, Nov 6 2016, 00:28:07) [GCC 4.8.5 20150623 (Red Hat 4.8.5-11)]
Best regards, Yasser
(for those who found it via googling) I think, you need to add -h localhost
to ldapadd command:
shell: ldapadd -x -h localhost -D "cn=Manager,dc={{ openldap_server_domain_name.split('.')[0] }},dc={{ openldap_server_domain_name.split('.')[1] }}" -w {{ openldap_server_rootpw }} -f {{ result.dest|default(result.path) }} && touch {{ openldap_server_app_path }}/roo tdn_created creates={{ openldap_server_app_path }}/rootdn_created·
@justrp Can confirm this works, thanks!