mirror of
https://github.com/spantaleev/matrix-docker-ansible-deploy.git
synced 2024-11-17 20:54:57 +00:00
2473cd655b
This fixes a regression since the change done in c1c152f7ac
.
When another role (say `matrix-jitsi`) included `roles/custom/matrix-base/tasks/util/ensure_openssl_installed.yml`,
which then included `{{ role_path }}/tasks/util/ensure_openssl_installed_DISTRO.yml`,
that `role_path` variable would end up being the parent role
(`matrix-jitsi`) and not the `matrix-base` role, so we'd get a failure.
An alternative solution may have been to avoid using `role_path`, but
importing roles properly (like we've done in this patch) sounds like a better way.
Unfortunately, `import_role` fails if `tasks_from` is something like
`util/ensure_openssl_installed` (containing a `/`), so I had to move
these utils out of `util/`.
Related to https://github.com/spantaleev/matrix-docker-ansible-deploy/issues/2228
25 lines
559 B
YAML
25 lines
559 B
YAML
---
|
|
|
|
- ansible.builtin.import_role:
|
|
name: custom/matrix-base
|
|
tasks_from: ensure_openssl_installed
|
|
|
|
#
|
|
# Tasks related to setting up jitsi
|
|
#
|
|
|
|
- name: Ensure Matrix jitsi base path exists
|
|
ansible.builtin.file:
|
|
path: "{{ item.path }}"
|
|
state: directory
|
|
mode: 0750
|
|
owner: "{{ matrix_user_username }}"
|
|
group: "{{ matrix_user_groupname }}"
|
|
with_items:
|
|
- {path: "{{ matrix_jitsi_base_path }}", when: true}
|
|
when: matrix_jitsi_enabled | bool and item.when
|
|
|
|
#
|
|
# Tasks related to getting rid of jitsi (if it was previously enabled)
|
|
#
|