This commit is contained in:
2026-01-25 00:41:19 -07:00
parent cfe3ecf85f
commit c9157bc933
4 changed files with 12 additions and 12 deletions

View File

@@ -1,25 +1,25 @@
---
# roles/ldap_server/tasks/schemas.yml
- name: Ensure LDAP core schema is loaded
ansible.builtin.command: >
command: >
ldapadd -Y EXTERNAL -H ldapi:/// -f /etc/openldap/schema/core.ldif
args:
creates: /etc/openldap/schema/.core_loaded
- name: Ensure LDAP cosine schema is loaded
ansible.builtin.command: >
command: >
ldapadd -Y EXTERNAL -H ldapi:/// -f /etc/openldap/schema/cosine.ldif
args:
creates: /etc/openldap/schema/.cosine_loaded
- name: Ensure LDAP inetorgperson schema is loaded
ansible.builtin.command: >
command: >
ldapadd -Y EXTERNAL -H ldapi:/// -f /etc/openldap/schema/inetorgperson.ldif
args:
creates: /etc/openldap/schema/.inetorgperson_loaded
- name: Ensure LDAP nis schema is loaded
ansible.builtin.command: >
command: >
ldapadd -Y EXTERNAL -H ldapi:/// -f /etc/openldap/schema/nis.ldif
args:
creates: /etc/openldap/schema/.nis_loaded
@@ -41,7 +41,7 @@
mode: '0600'
- name: Ensure custom LDAP schemas (sudo + openssh) are loaded
ansible.builtin.command: >
command: >
ldapadd -Y EXTERNAL -H ldapi:/// -f {{ item.file }}
args:
creates: "/etc/openldap/schema/.{{ item.name }}_loaded"
@@ -53,7 +53,7 @@
# Touch marker files for idempotency (optional but recommended)
- name: Ensure marker files exist
ansible.builtin.file:
file:
path: "/etc/openldap/schema/.{{ item.name }}_loaded"
state: touch
loop:
@@ -62,5 +62,5 @@
- { name: "inetorgperson" }
- { name: "nis" }
# - { name: "sudo" }
# - { name: "openssh" }
- { name: "openssh" }