mirror of
https://github.com/kevinveenbirkenbach/computer-playbook.git
synced 2026-11-06 02:54:26 +00:00
Add tests/lint/repository/test_task_file_numbering.py: numbered task files use exactly two leading digits, a numbered *_core.yml must be 00_core.yml, per directory the numbers are unique/consecutive and start at 01 (00 with a core file), numbered includes appear in ascending order, and shared helpers live in tasks/utils/ instead of the numbered chain. Apply it across every role: rename NN_core.yml to 00_core.yml with a consecutive down-shift of the siblings, move letter-suffix children into a subdirectory named after their parent task, relocate helpers included from more than one place into tasks/utils/, and update every reference (include_tasks, path_absolute, .ansible-lint-ignore, requirement docs). Legacy narration comments in the touched files are deleted; the upstream xwiki.properties reference block opts out via nocheck. The unused MAILU_IP6_PUBLIC var (only ever named in now-removed comments) is dropped. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
63 lines
2.7 KiB
YAML
63 lines
2.7 KiB
YAML
---
|
|
- name: ⚙️ Load LDAP configuration variables
|
|
include_vars:
|
|
file: "ldap.yml"
|
|
|
|
- name: 🔎 Check if LDAP source exists
|
|
database_query:
|
|
mask_values: "{{ MASK_CREDENTIALS_IN_LOGS | bool }}"
|
|
config: "{{ lookup('database', application_id) }}"
|
|
query_file: "{{ role_path }}/files/sql/select-ldap-auth-source-exists.sql"
|
|
named_args:
|
|
name: "{{ OPENPROJECT_LDAP.name }}"
|
|
expect_rows: true
|
|
register: ldap_check
|
|
|
|
- name: 🔄 Update existing LDAP auth source
|
|
database_query:
|
|
mask_values: "{{ MASK_CREDENTIALS_IN_LOGS | bool }}"
|
|
config: "{{ lookup('database', application_id) }}"
|
|
query_file: "{{ role_path }}/files/sql/update-ldap-auth-source.sql"
|
|
named_args:
|
|
host: "{{ OPENPROJECT_LDAP.host }}"
|
|
port: "{{ OPENPROJECT_LDAP.port }}"
|
|
account: "{{ OPENPROJECT_LDAP.account }}"
|
|
account_password: "{{ OPENPROJECT_LDAP.account_password }}"
|
|
base_dn: "{{ OPENPROJECT_LDAP.base_dn }}"
|
|
attr_login: "{{ OPENPROJECT_LDAP.attr_login }}"
|
|
attr_firstname: "{{ OPENPROJECT_LDAP.attr_firstname }}"
|
|
attr_lastname: "{{ OPENPROJECT_LDAP.attr_lastname }}"
|
|
attr_mail: "{{ OPENPROJECT_LDAP.attr_mail }}"
|
|
onthefly_register: "{{ OPENPROJECT_LDAP.onthefly_register }}"
|
|
attr_admin: "{{ OPENPROJECT_LDAP.attr_admin }}"
|
|
tls_mode: "{{ OPENPROJECT_LDAP.tls_mode }}"
|
|
filter_string: "{{ OPENPROJECT_LDAP.filter_string }}"
|
|
verify_peer: "{{ OPENPROJECT_LDAP.verify_peer }}"
|
|
tls_certificate_string: "{{ OPENPROJECT_LDAP.tls_certificate_string }}"
|
|
name: "{{ OPENPROJECT_LDAP.name }}"
|
|
when: ldap_check.rows | length > 0
|
|
|
|
- name: 📁 Create new LDAP auth source
|
|
database_query:
|
|
mask_values: "{{ MASK_CREDENTIALS_IN_LOGS | bool }}"
|
|
config: "{{ lookup('database', application_id) }}"
|
|
query_file: "{{ role_path }}/files/sql/insert-ldap-auth-source.sql"
|
|
named_args:
|
|
name: "{{ OPENPROJECT_LDAP.name }}"
|
|
host: "{{ OPENPROJECT_LDAP.host }}"
|
|
port: "{{ OPENPROJECT_LDAP.port }}"
|
|
account: "{{ OPENPROJECT_LDAP.account }}"
|
|
account_password: "{{ OPENPROJECT_LDAP.account_password }}"
|
|
base_dn: "{{ OPENPROJECT_LDAP.base_dn }}"
|
|
attr_login: "{{ OPENPROJECT_LDAP.attr_login }}"
|
|
attr_firstname: "{{ OPENPROJECT_LDAP.attr_firstname }}"
|
|
attr_lastname: "{{ OPENPROJECT_LDAP.attr_lastname }}"
|
|
attr_mail: "{{ OPENPROJECT_LDAP.attr_mail }}"
|
|
onthefly_register: "{{ OPENPROJECT_LDAP.onthefly_register }}"
|
|
attr_admin: "{{ OPENPROJECT_LDAP.attr_admin }}"
|
|
tls_mode: "{{ OPENPROJECT_LDAP.tls_mode }}"
|
|
filter_string: "{{ OPENPROJECT_LDAP.filter_string }}"
|
|
verify_peer: "{{ OPENPROJECT_LDAP.verify_peer }}"
|
|
tls_certificate_string: "{{ OPENPROJECT_LDAP.tls_certificate_string }}"
|
|
when: ldap_check.rows | length == 0
|