xoxys.pve/tasks/auth.yml

32 lines
759 B
YAML

---
- block:
- name: Configure auth provider
template:
src: etc/pve/domains.cfg.j2
dest: "{{ __pve_base_dir }}/domains.cfg"
owner: root
group: www-data
mode: 0640
become: True
become_user: root
- block:
- name: Ensure path for auth file exists
file:
path: "{{ __pve_base_dir }}/priv/ldap"
recurse: yes
state: directory
- name: Add passwd file for ldap bind
template:
src: etc/pve/priv/ldap.pw.j2
dest: "{{ __pve_base_dir }}/priv/ldap/{{ pve_auth_ldap_realm }}.pw"
owner: root
group: www-data
mode: 0600
become: True
become_user: root
when:
- pve_auth_ldap_enabled
- pve_auth_ldap_bind_password is defined