Jan Dittberner
2da305fb5f
This commit improves the gvaweb celery worker setup based on the work that has been done for gvaldap before. Old files have been removed and the setup uses the macros from gnuviechadmin/gvaapp_macros.sls.
23 lines
796 B
Text
23 lines
796 B
Text
{% set gvaappname = salt['grains.get']('gnuviechadmin:appname') %}
|
|
{% set purpose = "for LDAP data management" %}
|
|
{% from 'gnuviechadmin/gvaapp_macros.sls' import create_celery_worker with context %}
|
|
include:
|
|
- python.pipenv
|
|
- python.virtualenv
|
|
|
|
{{ 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
|