On 1/20/20 7:58 AM, Sandy Hung wrote:
> 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

> 
> 
> Sandy Hung於 2020年1月20日星期一 UTC+8下午2時38分35秒寫道:
> 
>     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 
> 
>     ---
>      - hosts: all
>        remote_user: sandy
>        become: true
> 
>        tasks:
>          - name: install openldap
>            apt: name=slapd update_cache=yes
> 
>          - name: install openldap
>            apt: name=ldap-utils update_cache=yes
> 
>          - name: install phpldapadmin
>            apt: name=phpldapadmin update_cache=yes
> 
> 
>          - name: check openldap is running
>            service: name=slapd state=started
> 
>          - name: Enabling LDAPS
>            shell: SLAPD_SERVICES="ldap://127.0.0.1:389/ 
> <http://127.0.0.1:389/> ldaps:/// ldapi:///"
> 
>          - name: Set a password for the admin user
>            ldap_passwd:
>              dn: cn=admin,dc=abagile,dc=com
>              passwd: "{{ vault_secret }}"
> 
>          - name: Setting passwords in admin
>            ldap_passwd:
>               dn: "{{ item.key }}"
>               passwd: "{{ item.value }}"
>            with_dict:
>               alice: alice123123
>               bob:   "|30b!"
>               admin: "{{ vault_secret }}"
> 
>          - name: Testing the above LDAPS config
>            shell: ldapsearch -d 9 -D "ou=users,dc=abagile,dc=com" \ -w 
> password -b "dc=ababile,dc=com" -H
>     "ldaps://ldaptest.abagile.com <http://ldaptest.abagile.com>" 
> "objectCllass=*"
> 
> -- 
> You received this message because you are subscribed to the Google Groups 
> "Ansible Project" group.
> To unsubscribe from this group and stop receiving emails from it, send an 
> email to
> ansible-project+unsubscr...@googlegroups.com 
> <mailto:ansible-project+unsubscr...@googlegroups.com>.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/ansible-project/09858b91-a31e-414e-91d3-59555df8be54%40googlegroups.com
> <https://groups.google.com/d/msgid/ansible-project/09858b91-a31e-414e-91d3-59555df8be54%40googlegroups.com?utm_medium=email&utm_source=footer>.


-- 
Ecommerce and Linux consulting + Perl and web application programming.
Debian and Sympa administration. Provisioning with Ansible.

-- 
You received this message because you are subscribed to the Google Groups 
"Ansible Project" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to ansible-project+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/ansible-project/74f08ff8-b11c-ba4f-99a3-283bc9373100%40linuxia.de.

Attachment: signature.asc
Description: OpenPGP digital signature

Reply via email to