SHA256
1
0

Make roles more reusable

This commit is contained in:
2026-01-29 02:49:52 -05:00
parent 4436599693
commit 44261c95fb
60 changed files with 1273 additions and 353 deletions

View File

@@ -9,11 +9,9 @@
- name: "Build file lists for {{ var_prefix }}"
ansible.builtin.set_fact:
"{{ var_prefix }}_files": "{{ lookup('community.general.filetree',
role_path ~ '/common/' ~ (subdir | default('')),
role_path ~ '/' ~ group_names[0] ~ '/' ~ (subdir | default(''))) | selectattr('state', 'equalto', 'file') | rejectattr('path', 'match', '.*\\.j2$') | list }}"
role_path ~ '/' ~ (subdir | default(''))) | selectattr('state', 'equalto', 'file') | rejectattr('path', 'match', '.*\\.j2$') | list }}"
"{{ var_prefix }}_templates": "{{ lookup('community.general.filetree',
role_path ~ '/common/' ~ (subdir | default('')),
role_path ~ '/' ~ group_names[0] ~ '/' ~ (subdir | default(''))) | selectattr('state', 'equalto', 'file') | selectattr('path', 'match', '.*\\.j2$') | list }}"
role_path ~ '/' ~ (subdir | default(''))) | selectattr('state', 'equalto', 'file') | selectattr('path', 'match', '.*\\.j2$') | list }}"
- name: "Ensure directories exist for {{ var_prefix }}"
ansible.builtin.file: