# openldap for ubuntu

**URL:** <https://forum.ansible.com/t/openldap-for-ubuntu/32002>\
**Category:** Ansible Project\
**Tags:** ubuntu\
**Created:** [January 20, 2020, 6:38am UTC](https://forum.ansible.com/t/openldap-for-ubuntu/32002 "2020-01-20T06:38:34Z")\
**Posts on this page:** 8\
**Page:** 1

<div class="post-metadata">

**Author:** ![Sandy\_Hung](https://avatars.discourse-cdn.com/v4/letter/s/e19adc/32.png) [@Sandy\_Hung](https://forum.ansible.com/u/Sandy_Hung)\
**Post date:** [January 20, 2020, 6:38am UTC](https://forum.ansible.com/t/openldap-for-ubuntu/32002/1 "2020-01-20T06:38:34Z")

</div>

I have problem run openldap show error message, how to solved this problem thanks.

ERROR! conflicting action statements: copy, force

The error appears to be in ‘/home/sandy/phpldapadmin.yml’: line 68, column 6, but may  
be elsewhere in the file depending on the exact syntax problem.

The offending line appears to be:

- name: Copy file config.php  
^ here

This is my ansible

---

<div class="post-metadata">

**Author:** ![Sandy\_Hung](https://avatars.discourse-cdn.com/v4/letter/s/e19adc/32.png) [@Sandy\_Hung](https://forum.ansible.com/u/Sandy_Hung)\
**Post date:** [January 20, 2020, 6:42am UTC](https://forum.ansible.com/t/openldap-for-ubuntu/32002/2 "2020-01-20T06:42:01Z")

</div>

sorry error message is

fatal: [192.168.1.153]: FAILED! =\> {“msg”: “The task includes an option with an undefined variable. The e’vault\_secret’ is undefined\n\nThe error appears to be in ‘/home/sandy/ldapinstall.yml’: line 23, column \nbe elsewhere in the file depending on the exact syntax problem.\n\nThe offending line appears to be:\n\name: Set a password for the admin user\n ^ here\n”}  
please help me thanks.

Sandy Hung於 2020年1月20日星期一 UTC+8下午2時38分35秒寫道：

---

<div class="post-metadata">

**Author:** ![racke](https://sea1.discourse-cdn.com/ansible/user_avatar/forum.ansible.com/racke/32/4767_2.png) [@racke](https://forum.ansible.com/u/racke)\
**Post date:** [January 20, 2020, 6:47am UTC](https://forum.ansible.com/t/openldap-for-ubuntu/32002/3 "2020-01-20T06:47:26Z")

</div>

> sorry error message is
> 
> fatal: [192.168.1.153]: FAILED! =\> {"msg": "The task includes an option with an undefined variable. The e'vault\_secret'  
> is undefined\n\nThe error appears to be in '/home/sandy/ldapinstall.yml': line 23, column \nbe elsewhere in the file  
> depending on the exact syntax problem.\n\nThe offending line appears to be:\n\name: Set a password for the admin user\n  
> ^ here\n"}  
> please help me thanks.

You have to define the variable vault\_secret.

Regards  
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Racke

---

<div class="post-metadata">

**Author:** ![Sandy\_Hung](https://avatars.discourse-cdn.com/v4/letter/s/e19adc/32.png) [@Sandy\_Hung](https://forum.ansible.com/u/Sandy_Hung)\
**Post date:** [January 20, 2020, 6:58am UTC](https://forum.ansible.com/t/openldap-for-ubuntu/32002/4 "2020-01-20T06:58:20Z")

</div>

How to define the variable vault\_secret?  
thanks.

Sandy Hung於 2020年1月20日星期一 UTC+8下午2時38分35秒寫道：

---

<div class="post-metadata">

**Author:** ![racke](https://sea1.discourse-cdn.com/ansible/user_avatar/forum.ansible.com/racke/32/4767_2.png) [@racke](https://forum.ansible.com/u/racke)\
**Post date:** [January 20, 2020, 7:08am UTC](https://forum.ansible.com/t/openldap-for-ubuntu/32002/5 "2020-01-20T07:08:27Z")

</div>

> How to define the variable vault\_secret?  
> thanks.

Well you should know what the value of this variable is ...

There are many places where you can define variables:

[https://docs.ansible.com/ansible/latest/user\_guide/playbooks\_variables.html](https://docs.ansible.com/ansible/latest/user_guide/playbooks_variables.html)

Regards  
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Racke

---

<div class="post-metadata">

**Author:** ![Sandy\_Hung](https://avatars.discourse-cdn.com/v4/letter/s/e19adc/32.png) [@Sandy\_Hung](https://forum.ansible.com/u/Sandy_Hung)\
**Post date:** [January 20, 2020, 7:23am UTC](https://forum.ansible.com/t/openldap-for-ubuntu/32002/6 "2020-01-20T07:23:34Z")

</div>

yes,but learning ansible only 2 week so, I don;t how to define variables.

Stefan Hornburg (Racke)於 2020年1月20日星期一 UTC+8下午3時08分54秒寫道：

---

<div class="post-metadata">

**Author:** ![Mark\_Anthony\_Garcia](https://avatars.discourse-cdn.com/v4/letter/m/4af34b/32.png) [@Mark\_Anthony\_Garcia](https://forum.ansible.com/u/Mark_Anthony_Garcia)\
**Post date:** [January 20, 2020, 7:32am UTC](https://forum.ansible.com/t/openldap-for-ubuntu/32002/7 "2020-01-20T07:32:19Z")

</div>

You can read this documentation on ansible.

[https://docs.ansible.com/ansible/latest/user\_guide/playbooks\_variables.html](https://docs.ansible.com/ansible/latest/user_guide/playbooks_variables.html)

Regards,  
Mark Garcia

---

<div class="post-metadata">

**Author:** ![Sandy\_Hung](https://avatars.discourse-cdn.com/v4/letter/s/e19adc/32.png) [@Sandy\_Hung](https://forum.ansible.com/u/Sandy_Hung)\
**Post date:** [January 20, 2020, 10:05am UTC](https://forum.ansible.com/t/openldap-for-ubuntu/32002/8 "2020-01-20T10:05:23Z")

</div>

Dear All:

andyidea can help me thanks.

PLAY [all] \*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*

TASK [Gathering Facts] \*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*  
ok: [192.168.1.153]

TASK [install openldap] \*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*  
ok: [192.168.1.153]

TASK [install openldap] \*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*  
ok: [192.168.1.153]

TASK [install phpldapadmin] \*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*  
ok: [192.168.1.153]

TASK [check openldap is running] \*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*  
ok: [192.168.1.153]

TASK [Enabling LDAPS] \*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*  
changed: [192.168.1.153]

TASK [Testing the above LDAPS config] \*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*  
fatal: [192.168.1.153]: FAILED! =\> {“changed”: true, “cmd”: “ldapsearch -d 9 -D "cn=test,cn=user,dc=abagile,dc=com" -w password -b "dc=ababile,dc=com" -H "ldaps://ldaptest.abagile.com" "objectCllass=\*"”, “delta”: “0:00:00.006822”, “end”: “2020-01-20 18:01:46.447142”, “msg”: “non-zero return code”, “rc”: 255, “start”: “2020-01-20 18:01:46.440320”, “stderr”: “ldap\_url\_parse\_ext(ldaps://ldaptest.abagile.com)\nldap\_create\nldap\_url\_parse\_ext(ldaps://ldaptest.abagile.com:636/??base)\nldap\_sasl\_bind\nldap\_send\_initial\_request\nldap\_new\_connection 1 1 0\nldap\_int\_open\_connection\nldap\_connect\_to\_host: TCP [ldaptest.abagile.com:636](http://ldaptest.abagile.com:636)\nldap\_new\_socket: 3\nldap\_prepare\_socket: 3\nldap\_connect\_to\_host: Trying 192.168.1.153:636\nldap\_pvt\_connect: fd: 3 tm: -1 async: 0\nattempting to connect: \nconnect errno: 111\nldap\_close\_socket: 3\nldap\_err2string\nldap\_sasl\_bind(SIMPLE): Can’t contact LDAP server (-1)”, “stderr\_lines”: [“ldap\_url\_parse\_ext(ldaps://ldaptest.abagile.com)”, “ldap\_create”, “ldap\_url\_parse\_ext(ldaps://ldaptest.abagile.com:636/??base)”, “ldap\_sasl\_bind”, “ldap\_send\_initial\_request”, “ldap\_new\_connection 1 1 0”, “ldap\_int\_open\_connection”, “ldap\_connect\_to\_host: TCP [ldaptest.abagile.com:636](http://ldaptest.abagile.com:636)”, “ldap\_new\_socket: 3”, “ldap\_prepare\_socket: 3”, “ldap\_connect\_to\_host: Trying 192.168.1.153:636”, “ldap\_pvt\_connect: fd: 3 tm: -1 async: 0”, "attempting to connect: ", “connect errno: 111”, “ldap\_close\_socket: 3”, “ldap\_err2string”, “ldap\_sasl\_bind(SIMPLE): Can’t contact LDAP server (-1)”], “stdout”: “”, “stdout\_lines”: }

PLAY RECAP \*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*  
192.168.1.153 : ok=6 changed=1 unreachable=0 failed=1 skipped=0 rescued=0 ignored=0

Sandy Hung於 2020年1月20日星期一 UTC+8下午2時38分35秒寫道：
