{% set gvaappname = salt['grains.get']('gnuviechadmin:appname') %} {% set purpose = "for LDAP data management" %} {% from 'gnuviechadmin/gvaapp_macros.sls' import create_celery_worker with context %} {{ create_celery_worker(gvaappname, purpose) }} {{ gvaappname }}-dependencies: pkg.installed: - pkgs: - libldap2-dev - libsasl2-dev - require_in: - cmd: {{ gvaappname }}-requirements base-ldap-objects: cmd.script: - source: salt://gnuviechadmin/gvaldap/create_base_ldap_objects.sh - template: jinja - runas: root - unless: ldapsearch -Y EXTERNAL -H ldapi:// -b "{{ salt['pillar.get']('gnuviechadmin:ldap_base_dn') }}" "cn={{ salt['pillar.get']('gnuviechadmin:ldap_admin_user') }}" | grep -q numEntries