gvasalt/states/gnuviechadmin/gvaldap.sls
Jan Dittberner ef7fbd0afd Use cmd with runas parameter
Replace the deprecated user and group parameters with runas to fix
deprecation warnings.
2016-09-24 23:53:49 +02:00

19 lines
564 B
Text

include:
- gnuviechadmin.base
- gnuviechadmin.django
- gnuviechadmin.celery
gvaldap-packages:
pkg.installed:
- pkgs:
- libldap2-dev
- libsasl2-dev
- require_in:
- pkg: gnuviechadmin-packages
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