Implemented filter functions to get roles by application_id

This commit is contained in:
2025-07-09 14:52:51 +02:00
parent c9c73cbdb2
commit f3939661e4
6 changed files with 175 additions and 7 deletions

View File

@@ -3,8 +3,8 @@
src: "{{ item }}"
dest: "{{ docker_compose.files.dockerfile }}"
loop:
- "{{ playbook_dir }}/roles/web-app-{{ application_id }}/templates/Dockerfile.j2"
- "{{ playbook_dir }}/roles/web-app-{{ application_id }}/files/Dockerfile"
- "{{ application_id | abs_role_path_by_application_id }}/templates/Dockerfile.j2"
- "{{ application_id | abs_role_path_by_application_id }}/files/Dockerfile"
notify: docker compose up
register: create_dockerfile_result
failed_when:
@@ -20,8 +20,8 @@
notify: docker compose up
register: env_template
loop:
- "{{ playbook_dir }}/roles/web-app-{{ application_id }}/templates/env.j2"
- "{{ playbook_dir }}/roles/web-app-{{ application_id }}/files/env"
- "{{ application_id | abs_role_path_by_application_id }}/templates/env.j2"
- "{{ application_id | abs_role_path_by_application_id }}/files/env"
failed_when:
- env_template is failed
- "'Could not find or access' not in env_template.msg"

View File

@@ -1 +1 @@
modifier_javascript_template_file: "{{ playbook_dir }}/roles/web-app-{{ application_id }}/templates/javascript.js.j2"
modifier_javascript_template_file: "{{ application_id | abs_role_path_by_application_id }}/templates/javascript.js.j2"

View File

@@ -15,7 +15,7 @@ function getExportName(slug) {
// Root: redirect to your documentation
app.get('/', (req, res) => {
res.redirect('{{ domains | get_url('sphinx', web_protocol) }}/roles/web-app-{{ application_id }}/README.html');
res.redirect('{{ domains | get_url('sphinx', web_protocol) }}/{{ application_id | rel_role_path_by_application_id}}/README.html');
});
// GET /:slug.svg