Updates for AniNIX/Password

This commit is contained in:
2025-09-29 16:33:35 -05:00
parent 78af592485
commit 25c9872a0a
8 changed files with 77 additions and 146 deletions

View File

@@ -1,14 +1,6 @@
---
- name: Create the base config
become: yes
template:
src: slapd.ldif
dest: /etc/openldap/slapd.ldif
owner: ldap
group: ldap
mode: 0640
- name: Create the directories
become: yes
file:
path: "{{ item }}"
owner: ldap
@@ -21,15 +13,25 @@
- /etc/openldap/groups.d
- /etc/openldap/slapd.d
- name: Initialize the instance
become: yes
command:
cmd: slapadd -n 0 -F /etc/openldap/slapd.d/ -l /etc/openldap/config.ldif && chown -R ldap: /etc/openldap
creates: /etc/openldap/slapd.d/cn=config
# - name: Create the base config
# become: yes
# template:
# src: slapd.ldif
# dest: /etc/openldap/slapd.ldif
# owner: ldap
# group: ldap
# mode: 0640
# - name: Initialize the instance
# become: yes
# command:
# cmd: "slapadd -n 0 -F /etc/openldap/slapd.d/ -l /etc/openldap/config.ldif && chown -R ldap: /etc/openldap"
# creates: /etc/openldap/slapd.d/cn=config
- name: Ensure the service
become: yes
ignore_errors: true
service:
name: slapd
state: restarted
state: started
enabled: yes