diff --git a/roles/matrix-ma1sd/defaults/main.yml b/roles/matrix-ma1sd/defaults/main.yml index 822cc9422..713dd3ed1 100644 --- a/roles/matrix-ma1sd/defaults/main.yml +++ b/roles/matrix-ma1sd/defaults/main.yml @@ -11,7 +11,8 @@ matrix_ma1sd_docker_image: "ma1uta/ma1sd:2.4.0-{{ matrix_ma1sd_architecture }}" matrix_ma1sd_docker_image_force_pull: "{{ matrix_ma1sd_docker_image.endswith(':latest') }}" matrix_ma1sd_base_path: "{{ matrix_base_data_path }}/ma1sd" -matrix_ma1sd_docker_src_files_path: "{{ matrix_ma1sd_base_path }}/docker-src" +# We need the docker src directory to be named ma1sd. See: https://github.com/spantaleev/matrix-docker-ansible-deploy/pull/588 +matrix_ma1sd_docker_src_files_path: "{{ matrix_ma1sd_base_path }}/docker-src/ma1sd" matrix_ma1sd_config_path: "{{ matrix_ma1sd_base_path }}/config" matrix_ma1sd_data_path: "{{ matrix_ma1sd_base_path }}/data" diff --git a/roles/matrix-ma1sd/tasks/setup_ma1sd.yml b/roles/matrix-ma1sd/tasks/setup_ma1sd.yml index ee055afd7..44fe6b19e 100644 --- a/roles/matrix-ma1sd/tasks/setup_ma1sd.yml +++ b/roles/matrix-ma1sd/tasks/setup_ma1sd.yml @@ -54,13 +54,20 @@ git: repo: https://github.com/ma1uta/ma1sd.git dest: "{{ matrix_ma1sd_docker_src_files_path }}" - version: "v{{ matrix_ma1sd_docker_image.split(':')[1] }}" + version: "{{ matrix_ma1sd_docker_image.split(':')[1].split('-')[0] }}" force: "yes" - name: Ensure ma1sd Docker image is built shell: "./gradlew dockerBuild" args: chdir: "{{ matrix_ma1sd_docker_src_files_path }}" + + - name: Ensure ma1sd Docker image is tagged correctly + docker_image: + name: "{{ matrix_ma1sd_docker_image.split('-')[0] }}" + repository: "{{ matrix_ma1sd_docker_image }}" + force_tag: yes + source: local when: "matrix_ma1sd_enabled|bool and matrix_ma1sd_container_image_self_build" - name: Ensure ma1sd config installed