Fix self-building for various components on Ansible < 2.8

Fixes https://github.com/spantaleev/matrix-docker-ansible-deploy/issues/1070
This commit is contained in:
Slavi Pantaleev 2021-05-20 08:43:20 +03:00
parent dd7a23ede6
commit 1ab507349c
22 changed files with 46 additions and 24 deletions

View File

@ -71,11 +71,12 @@
register: matrix_appservice_irc_git_pull_results register: matrix_appservice_irc_git_pull_results
when: "matrix_appservice_irc_enabled|bool and matrix_appservice_irc_container_self_build|bool" when: "matrix_appservice_irc_enabled|bool and matrix_appservice_irc_container_self_build|bool"
- name: Ensure matrix-appservice-irc Docker image is build - name: Ensure matrix-appservice-irc Docker image is built
docker_image: docker_image:
name: "{{ matrix_appservice_irc_docker_image }}" name: "{{ matrix_appservice_irc_docker_image }}"
source: build source: build
force_source: yes force_source: "{{ matrix_appservice_irc_git_pull_results.changed 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_appservice_irc_git_pull_results.changed }}"
build: build:
dockerfile: Dockerfile dockerfile: Dockerfile
path: "{{ matrix_appservice_irc_docker_src_files_path }}" path: "{{ matrix_appservice_irc_docker_src_files_path }}"

View File

@ -51,7 +51,8 @@
docker_image: docker_image:
name: "{{ matrix_appservice_slack_docker_image }}" name: "{{ matrix_appservice_slack_docker_image }}"
source: build source: build
force_source: yes force_source: "{{ matrix_appservice_slack_git_pull_results.changed 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_appservice_slack_git_pull_results.changed }}"
build: build:
dockerfile: Dockerfile dockerfile: Dockerfile
path: "{{ matrix_appservice_slack_docker_src_files_path }}" path: "{{ matrix_appservice_slack_docker_src_files_path }}"

View File

@ -69,7 +69,8 @@
docker_image: docker_image:
name: "{{ matrix_mautrix_facebook_docker_image }}" name: "{{ matrix_mautrix_facebook_docker_image }}"
source: build source: build
force_source: "{{ matrix_mautrix_facebook_git_pull_results.changed }}" force_source: "{{ matrix_mautrix_facebook_git_pull_results.changed 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_git_pull_results.changed }}"
build: build:
dockerfile: Dockerfile dockerfile: Dockerfile
path: "{{ matrix_mautrix_facebook_docker_src_files_path }}" path: "{{ matrix_mautrix_facebook_docker_src_files_path }}"

View File

@ -68,7 +68,8 @@
docker_image: docker_image:
name: "{{ matrix_mautrix_hangouts_docker_image }}" name: "{{ matrix_mautrix_hangouts_docker_image }}"
source: build source: build
force_source: "{{ matrix_mautrix_hangouts_git_pull_results.changed }}" force_source: "{{ matrix_mautrix_hangouts_git_pull_results.changed 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_hangouts_git_pull_results.changed }}"
build: build:
dockerfile: Dockerfile dockerfile: Dockerfile
path: "{{ matrix_mautrix_hangouts_docker_src_files_path }}" path: "{{ matrix_mautrix_hangouts_docker_src_files_path }}"

View File

@ -44,7 +44,8 @@
docker_image: docker_image:
name: "{{ matrix_mautrix_instagram_docker_image }}" name: "{{ matrix_mautrix_instagram_docker_image }}"
source: build source: build
force_source: "{{ matrix_mautrix_instagram_git_pull_results.changed }}" force_source: "{{ matrix_mautrix_instagram_git_pull_results.changed 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_instagram_git_pull_results.changed }}"
build: build:
dockerfile: Dockerfile dockerfile: Dockerfile
path: "{{ matrix_mautrix_instagram_docker_src_files_path }}" path: "{{ matrix_mautrix_instagram_docker_src_files_path }}"

View File

@ -64,11 +64,12 @@
register: matrix_mautrix_telegram_git_pull_results register: matrix_mautrix_telegram_git_pull_results
when: "matrix_mautrix_telegram_container_self_build|bool" when: "matrix_mautrix_telegram_container_self_build|bool"
- name: Ensure matrix-mautrix-telegram Docker image is build - name: Ensure matrix-mautrix-telegram Docker image is built
docker_image: docker_image:
name: "{{ matrix_mautrix_telegram_docker_image }}" name: "{{ matrix_mautrix_telegram_docker_image }}"
source: build source: build
force_source: yes force_source: "{{ matrix_mautrix_telegram_git_pull_results.changed 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_telegram_git_pull_results.changed }}"
build: build:
dockerfile: Dockerfile dockerfile: Dockerfile
path: "{{ matrix_mautrix_telegram_docker_src_files_path }}" path: "{{ matrix_mautrix_telegram_docker_src_files_path }}"

View File

@ -85,7 +85,8 @@
docker_image: docker_image:
name: "{{ matrix_mx_puppet_discord_docker_image }}" name: "{{ matrix_mx_puppet_discord_docker_image }}"
source: build source: build
force_source: "{{ matrix_mx_puppet_discord_git_pull_results.changed }}" force_source: "{{ matrix_mx_puppet_discord_git_pull_results.changed 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_mx_puppet_discord_git_pull_results.changed }}"
build: build:
dockerfile: Dockerfile dockerfile: Dockerfile
path: "{{ matrix_mx_puppet_discord_docker_src_files_path }}" path: "{{ matrix_mx_puppet_discord_docker_src_files_path }}"

View File

@ -85,7 +85,8 @@
docker_image: docker_image:
name: "{{ matrix_mx_puppet_groupme_docker_image }}" name: "{{ matrix_mx_puppet_groupme_docker_image }}"
source: build source: build
force_source: "{{ matrix_mx_puppet_groupme_git_pull_results.changed }}" force_source: "{{ matrix_mx_puppet_groupme_git_pull_results.changed 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_mx_puppet_groupme_git_pull_results.changed }}"
build: build:
dockerfile: Dockerfile dockerfile: Dockerfile
path: "{{ matrix_mx_puppet_groupme_docker_src_files_path }}" path: "{{ matrix_mx_puppet_groupme_docker_src_files_path }}"

View File

@ -69,7 +69,8 @@
docker_image: docker_image:
name: "{{ matrix_mx_puppet_instagram_docker_image }}" name: "{{ matrix_mx_puppet_instagram_docker_image }}"
source: build source: build
force_source: "{{ matrix_mx_puppet_instagram_git_pull_results.changed }}" force_source: "{{ matrix_mx_puppet_instagram_git_pull_results.changed 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_mx_puppet_instagram_git_pull_results.changed }}"
build: build:
dockerfile: Dockerfile dockerfile: Dockerfile
path: "{{ matrix_mx_puppet_instagram_docker_src_files_path }}" path: "{{ matrix_mx_puppet_instagram_docker_src_files_path }}"

View File

@ -85,7 +85,8 @@
docker_image: docker_image:
name: "{{ matrix_mx_puppet_skype_docker_image }}" name: "{{ matrix_mx_puppet_skype_docker_image }}"
source: build source: build
force_source: "{{ matrix_mx_puppet_skype_git_pull_results.changed }}" force_source: "{{ matrix_mx_puppet_skype_git_pull_results.changed 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_mx_puppet_skype_git_pull_results.changed }}"
build: build:
dockerfile: Dockerfile dockerfile: Dockerfile
path: "{{ matrix_mx_puppet_skype_docker_src_files_path }}" path: "{{ matrix_mx_puppet_skype_docker_src_files_path }}"

View File

@ -81,7 +81,8 @@
docker_image: docker_image:
name: "{{ matrix_mx_puppet_slack_docker_image }}" name: "{{ matrix_mx_puppet_slack_docker_image }}"
source: build source: build
force_source: "{{ matrix_mx_puppet_slack_git_pull_results.changed }}" force_source: "{{ matrix_mx_puppet_slack_git_pull_results.changed 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_mx_puppet_slack_git_pull_results.changed }}"
build: build:
dockerfile: Dockerfile dockerfile: Dockerfile
path: "{{ matrix_mx_puppet_slack_docker_src_files_path }}" path: "{{ matrix_mx_puppet_slack_docker_src_files_path }}"

View File

@ -85,7 +85,8 @@
docker_image: docker_image:
name: "{{ matrix_mx_puppet_steam_docker_image }}" name: "{{ matrix_mx_puppet_steam_docker_image }}"
source: build source: build
force_source: "{{ matrix_mx_puppet_steam_git_pull_results.changed }}" force_source: "{{ matrix_mx_puppet_steam_git_pull_results.changed 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_mx_puppet_steam_git_pull_results.changed }}"
build: build:
dockerfile: Dockerfile dockerfile: Dockerfile
path: "{{ matrix_mx_puppet_steam_docker_src_files_path }}" path: "{{ matrix_mx_puppet_steam_docker_src_files_path }}"

View File

@ -85,7 +85,8 @@
docker_image: docker_image:
name: "{{ matrix_mx_puppet_twitter_docker_image }}" name: "{{ matrix_mx_puppet_twitter_docker_image }}"
source: build source: build
force_source: "{{ matrix_mx_puppet_twitter_git_pull_results.changed }}" force_source: "{{ matrix_mx_puppet_twitter_git_pull_results.changed 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_mx_puppet_twitter_git_pull_results.changed }}"
build: build:
dockerfile: Dockerfile dockerfile: Dockerfile
path: "{{ matrix_mx_puppet_twitter_docker_src_files_path }}" path: "{{ matrix_mx_puppet_twitter_docker_src_files_path }}"

View File

@ -37,7 +37,8 @@
docker_image: docker_image:
name: "{{ matrix_client_element_docker_image }}" name: "{{ matrix_client_element_docker_image }}"
source: build source: build
force_source: "{{ matrix_client_element_git_pull_results.changed }}" force_source: "{{ matrix_client_element_git_pull_results.changed 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_client_element_git_pull_results.changed }}"
build: build:
dockerfile: Dockerfile dockerfile: Dockerfile
path: "{{ matrix_client_element_docker_src_files_path }}" path: "{{ matrix_client_element_docker_src_files_path }}"

View File

@ -30,7 +30,8 @@
docker_image: docker_image:
name: "{{ matrix_corporal_docker_image }}" name: "{{ matrix_corporal_docker_image }}"
source: build source: build
force_source: "{{ matrix_corporal_git_pull_results.changed }}" force_source: "{{ matrix_corporal_git_pull_results.changed 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_corporal_git_pull_results.changed }}"
build: build:
dockerfile: etc/docker/Dockerfile dockerfile: etc/docker/Dockerfile
path: "{{ matrix_corporal_container_src_files_path }}" path: "{{ matrix_corporal_container_src_files_path }}"

View File

@ -38,7 +38,8 @@
docker_image: docker_image:
name: "{{ matrix_coturn_docker_image }}" name: "{{ matrix_coturn_docker_image }}"
source: build source: build
force_source: "{{ matrix_coturn_git_pull_results.changed }}" force_source: "{{ matrix_coturn_git_pull_results.changed 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_coturn_git_pull_results.changed }}"
build: build:
dockerfile: "{{ matrix_coturn_container_image_self_build_repo_dockerfile_path }}" dockerfile: "{{ matrix_coturn_container_image_self_build_repo_dockerfile_path }}"
path: "{{ matrix_coturn_docker_src_files_path }}" path: "{{ matrix_coturn_docker_src_files_path }}"

View File

@ -33,7 +33,8 @@
docker_image: docker_image:
name: "{{ matrix_dynamic_dns_docker_image }}" name: "{{ matrix_dynamic_dns_docker_image }}"
source: build source: build
force_source: "{{ matrix_dynamic_dns_git_pull_results.changed }}" force_source: "{{ matrix_dynamic_dns_git_pull_results.changed 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_dynamic_dns_git_pull_results.changed }}"
build: build:
dockerfile: Dockerfile dockerfile: Dockerfile
path: "{{ matrix_dynamic_dns_docker_src_files_path }}" path: "{{ matrix_dynamic_dns_docker_src_files_path }}"

View File

@ -36,7 +36,8 @@
docker_image: docker_image:
name: "{{ matrix_mailer_docker_image }}" name: "{{ matrix_mailer_docker_image }}"
source: build source: build
force_source: "{{ matrix_mailer_git_pull_results.changed }}" force_source: "{{ matrix_mailer_git_pull_results.changed 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_mailer_git_pull_results.changed }}"
build: build:
dockerfile: Dockerfile dockerfile: Dockerfile
path: "{{ matrix_mailer_container_image_self_build_src_files_path }}" path: "{{ matrix_mailer_container_image_self_build_src_files_path }}"

View File

@ -61,7 +61,8 @@
docker_image: docker_image:
name: "{{ matrix_postgres_pgloader_docker_image }}" name: "{{ matrix_postgres_pgloader_docker_image }}"
source: build source: build
force_source: "{{ matrix_postgres_pgloader_git_pull_results.changed }}" force_source: "{{ matrix_postgres_pgloader_git_pull_results.changed 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_postgres_pgloader_git_pull_results.changed }}"
build: build:
dockerfile: Dockerfile dockerfile: Dockerfile
path: "{{ matrix_postgres_pgloader_container_image_self_build_src_path }}" path: "{{ matrix_postgres_pgloader_container_image_self_build_src_path }}"

View File

@ -66,7 +66,8 @@
docker_image: docker_image:
name: "{{ matrix_registration_docker_image }}" name: "{{ matrix_registration_docker_image }}"
source: build source: build
force_source: "{{ matrix_registration_git_pull_results.changed }}" force_source: "{{ matrix_registration_git_pull_results.changed 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_registration_git_pull_results.changed }}"
build: build:
dockerfile: Dockerfile dockerfile: Dockerfile
path: "{{ matrix_registration_docker_src_files_path }}" path: "{{ matrix_registration_docker_src_files_path }}"

View File

@ -24,7 +24,8 @@
docker_image: docker_image:
name: "{{ matrix_synapse_admin_docker_image }}" name: "{{ matrix_synapse_admin_docker_image }}"
source: build source: build
force_source: "{{ matrix_synapse_admin_git_pull_results.changed }}" force_source: "{{ matrix_synapse_admin_git_pull_results.changed 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_synapse_admin_git_pull_results.changed }}"
build: build:
dockerfile: Dockerfile dockerfile: Dockerfile
path: "{{ matrix_synapse_admin_docker_src_files_path }}" path: "{{ matrix_synapse_admin_docker_src_files_path }}"

View File

@ -31,7 +31,8 @@
docker_image: docker_image:
name: "{{ matrix_synapse_docker_image }}" name: "{{ matrix_synapse_docker_image }}"
source: build source: build
force_source: "{{ matrix_synapse_git_pull_results.changed }}" force_source: "{{ matrix_synapse_git_pull_results.changed 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_synapse_git_pull_results.changed }}"
build: build:
dockerfile: docker/Dockerfile dockerfile: docker/Dockerfile
path: "{{ matrix_synapse_docker_src_files_path }}" path: "{{ matrix_synapse_docker_src_files_path }}"