openldap for ubuntu

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

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秒寫道:

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
        Racke

How to define the variable vault_secret?
thanks.

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

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

Regards
          Racke

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秒寫道:

You can read this documentation on ansible.

https://docs.ansible.com/ansible/latest/user_guide/playbooks_variables.html

Regards,
Mark Garcia

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\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”, “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秒寫道: