Use openldap health check as require for group create
Change-Id: I2ea2df53ba98cc2cbf73dc50ee24fa360ca7138a
Related-Prod: PROD-28907 (PROD:28907)
diff --git a/openldap/client.sls b/openldap/client.sls
index aa7b78f..070bf26 100644
--- a/openldap/client.sls
+++ b/openldap/client.sls
@@ -56,8 +56,9 @@
{%- else %}
- delete_others: true
{%- endif %}
- {%- if tree.split(',')[-1].split('=')[0] != 'dc' %}
- require:
+ - cmd: openldap_wait_for_server_{{ client.server.host }}
+ {%- if tree.split(',')[-1].split('=')[0] != 'dc' %}
- ldap: openldap_client_{{ tree }}
{%- for member in param.get('member', []) %}
- ldap: openldap_client_{{ member }}{% if member.split(',')[-1].split('=')[0] != 'dc' %},{{ client.server.basedn }}{% endif %}
@@ -66,8 +67,6 @@
{%- if grains.get('noservices', False) %}
- onlyif: 'false'
{%- endif %}
- - onfail:
- - cmd: openldap_wait_for_server_{{ client.server.host }}
{%- if param.entry is defined %}
{{ process_entry(param.entry, param.get('type', 'cn') + "=" + name + "," + tree) }}