Hi,
I'm building a playbook to install and configure openldap on SLES.
The original openldap server installs an example db at /var/lib/ldap.
This files have to be removed, before I can install my own db.
What is the best way to delete the example db (once)?
I tried with tasks like
- name: check for example db
shell: grep Example /var/lib/ldap/DB_CONFIG.example
register: exampleDB
ignore_errors: TRUE
- name: delete example db
shell: rm /var/lib/ldap/*
when: exampleDB|success
This works. "delete example db" is skipped, if there is no
DB_CONFIG.example anymore.
But I always get the "failed" for "check for example db" for the second
(and further) run(s), which is why I have to ignore it.
Is there any way to circumvent this?
Marc
--
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 post to this group, send email to [email protected].
For more options, visit https://groups.google.com/groups/opt_out.