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"