resolve compose template via ansible search path instead of absolute app_templates_path
This commit is contained in:
@@ -48,21 +48,6 @@
|
||||
- not (app_dir is match('.*\.\..*'))
|
||||
fail_msg: "Security validation failed for {{ app_name }}: app_dir '{{ app_dir }}' contains invalid characters or path traversal sequences"
|
||||
|
||||
- name: Check if compose template exists
|
||||
ansible.builtin.stat:
|
||||
path: "{{ app_compose_template }}"
|
||||
register: _compose_template_stat
|
||||
delegate_to: localhost
|
||||
become: false
|
||||
when: app_compose_template is defined and app_compose_template | length > 0
|
||||
|
||||
- name: Assert compose template exists
|
||||
ansible.builtin.assert:
|
||||
that:
|
||||
- _compose_template_stat.stat.exists
|
||||
fail_msg: "Template file not found for {{ app_name }}: '{{ app_compose_template }}' does not exist"
|
||||
when: app_compose_template is defined and app_compose_template | length > 0
|
||||
|
||||
- name: Check if compose file exists
|
||||
ansible.builtin.stat:
|
||||
path: "{{ app_compose_file }}"
|
||||
|
||||
Reference in New Issue
Block a user