refactor based on Slavi's requests

This commit is contained in:
Horvath Gergely
2020-03-08 00:24:00 +01:00
parent d53d63ab07
commit 310aa685f9
17 changed files with 96 additions and 101 deletions

View File

@ -14,25 +14,7 @@
source: "{{ 'pull' if ansible_version.major > 2 or ansible_version.minor > 7 else omit }}"
force_source: "{{ matrix_mautrix_facebook_docker_image_force_pull if ansible_version.major > 2 or ansible_version.minor >= 8 else omit }}"
force: "{{ omit if ansible_version.major > 2 or ansible_version.minor >= 8 else matrix_mautrix_facebook_docker_image_force_pull }}"
when: matrix_mautrix_facebook_enabled|bool and not matrix_raspberry_pi
- name: Ensure Mautrix Facebook repository is present on Raspberry pi
git:
repo: https://github.com/tulir/mautrix-facebook.git
dest: "{{ matrix_docker_mautrix_facebook_src_files_path }}"
# version: "{{ matrix_coturn_docker_image.split(':')[1] }}"
force: "yes"
when: "matrix_mautrix_facebook_enabled|bool and matrix_raspberry_pi"
- name: Ensure Mautrix Facebook Docker image is build (Raspberry pi)
docker_image:
name: "{{ matrix_mautrix_facebook_docker_image }}"
source: build
build:
dockerfile: Dockerfile
path: "{{ matrix_docker_mautrix_facebook_src_files_path }}"
pull: yes
when: "matrix_mautrix_facebook_enabled|bool and matrix_raspberry_pi"
when: matrix_mautrix_facebook_enabled|bool and not matrix_mautrix_facebook_self_build
- name: Ensure Mautrix Facebook paths exist
file:
@ -45,6 +27,25 @@
- "{{ matrix_mautrix_facebook_base_path }}"
- "{{ matrix_mautrix_facebook_config_path }}"
- "{{ matrix_mautrix_facebook_data_path }}"
- { src: "{{ matrix_docker_mautrix_facebook_src_files_path }}", when: "{{ matrix_mautrix_facebook_self_build }}" }
- name: Ensure Mautrix Facebook repository is present on self-build
git:
repo: https://github.com/tulir/mautrix-facebook.git
dest: "{{ matrix_docker_mautrix_facebook_src_files_path }}"
# version: "{{ matrix_coturn_docker_image.split(':')[1] }}"
force: "yes"
when: "matrix_mautrix_facebook_enabled|bool and matrix_mautrix_facebook_self_build"
- name: Ensure Mautrix Facebook Docker image is build
docker_image:
name: "{{ matrix_mautrix_facebook_docker_image }}"
source: build
build:
dockerfile: Dockerfile
path: "{{ matrix_docker_mautrix_facebook_src_files_path }}"
pull: yes
when: "matrix_mautrix_facebook_enabled|bool and matrix_mautrix_facebook_self_build"
- name: Check if an old database file already exists
stat: