Files
claudeandClaude Opus 5.5 99687ea231 Own LDAP account and mail, Harmony Users gate, Dex-only sign-in UI
- tasks/ldap.yml keeps cn=Harmony (harmony@eom.dev): password from Vault,
  in Harmony Users, Postfix Users and Dovecot Users. GoTrue sends as it,
  and it is an instance admin alongside eric@eom.dev.
- theme.js hides the e-mail/password form; Register and /register (also in
  Caddy) go to https://www.eom.dev/members/.
- The Dex button uses the square eom.dev icon.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-10 17:44:29 -05:00

30 lines
1.3 KiB
YAML

# SPDX-License-Identifier: MIT-0
# The service's own LDAP account (harmony@eom.dev): mail sender through
# postfix.eom.dev and, through Dex, the instance's admin. Done in the OpenLDAP
# pod as cn=admin, like ericomeehan.www's membership groups.
---
- name: Find the OpenLDAP pod
kubernetes.core.k8s_info:
kubeconfig: "{{ harmony_kubeconfig | default(omit, true) }}"
context: "{{ harmony_kube_context | default(omit, true) }}"
kind: Pod
namespace: "{{ harmony_ldap_namespace }}"
label_selectors: ["{{ harmony_ldap_pod_selector }}"]
field_selectors: [status.phase=Running]
register: _harmony_ldap_pods
failed_when: _harmony_ldap_pods.resources | length == 0
- name: Ensure the service's LDAP account, password and groups
kubernetes.core.k8s_exec:
kubeconfig: "{{ harmony_kubeconfig | default(omit, true) }}"
context: "{{ harmony_kube_context | default(omit, true) }}"
namespace: "{{ harmony_ldap_namespace }}"
pod: "{{ (_harmony_ldap_pods.resources | first).metadata.name }}"
command: >-
sh -c 'echo {{ lookup('ansible.builtin.template', 'ldap-account.sh.j2') | b64encode }} | base64 -d | sh'
vars:
_harmony_ldap_dn: "cn={{ harmony_ldap_account.cn }},{{ harmony_ldap_account.ou }}"
register: _harmony_ldap
changed_when: "'changed=1' in _harmony_ldap.stdout"
no_log: true