You can read this documentation on ansible.

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

Regards,
Mark Garcia

On Mon, Jan 20, 2020 at 8:23 AM Sandy Hung <[email protected]> wrote:

> 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秒寫道:
>>
>> 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
>> > [email protected] <mailto:
>> [email protected]>.
>> > 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 [email protected].
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/ansible-project/9dc79194-9e1d-4e2e-8022-79889a77874a%40googlegroups.com
> <https://groups.google.com/d/msgid/ansible-project/9dc79194-9e1d-4e2e-8022-79889a77874a%40googlegroups.com?utm_medium=email&utm_source=footer>
> .
>

-- 
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 [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/ansible-project/CAGFwMxrvkUe%2BNPd3eySJLNpfvsmDU%2B_zySme_ZJfFJGpxJEuNw%40mail.gmail.com.

Reply via email to