ansible-role-nextcloud/tasks/nextcloud-ldap.yml

19 lines
754 B
YAML

---
- block:
- name: Enable ldap
shell: cd {{ item.doc_root }} ; php occ app:enable user_ldap ; touch {{ item.doc_root }}/.ht_setup/ht_nextcloud_ldap_enabled
args:
creates: '{{ item.doc_root }}/.ht_setup/ht_nextcloud_ldap_enabled'
with_items: '{{ phpfpm_pools }}'
- name: Create an empty ldap configuration to start with
shell: cd {{ item.doc_root }} ; php occ ldap:create-empty-config ; touch {{ item.doc_root }}/.ht_setup/ht_nextcloud_ldap_configured
args:
creates: '{{ item.doc_root }}/.ht_setup/ht_nextcloud_ldap_configured'
with_items: '{{ phpfpm_pools }}'
become: True
become_user: '{{ nextcloud_user }}'
when: nextcloud_ldap_auth
tags: [ 'nextcloud', 'nextcloud_config', 'nextcloud_config_ldap' ]