|
33 | 33 | delay: "{{ devture_playbook_help_container_retries_delay }}" |
34 | 34 | until: result is not failed |
35 | 35 |
|
36 | | -- name: Ensure matrix-registration-bot repository is present on self-build |
37 | | - ansible.builtin.git: |
38 | | - repo: "{{ matrix_bot_matrix_registration_bot_docker_repo }}" |
39 | | - version: "{{ matrix_bot_matrix_registration_bot_docker_repo_version }}" |
40 | | - dest: "{{ matrix_bot_matrix_registration_bot_docker_src_files_path }}" |
41 | | - force: "yes" |
42 | | - become: true |
43 | | - become_user: "{{ matrix_user_username }}" |
44 | | - register: matrix_bot_matrix_registration_bot_git_pull_results |
45 | | - when: "matrix_bot_matrix_registration_bot_container_image_self_build | bool" |
| 36 | +- when: matrix_bot_matrix_registration_bot_container_image_self_build | bool |
| 37 | + block: |
| 38 | + - name: Ensure matrix-registration-bot repository is present on self-build |
| 39 | + ansible.builtin.git: |
| 40 | + repo: "{{ matrix_bot_matrix_registration_bot_docker_repo }}" |
| 41 | + version: "{{ matrix_bot_matrix_registration_bot_docker_repo_version }}" |
| 42 | + dest: "{{ matrix_bot_matrix_registration_bot_docker_src_files_path }}" |
| 43 | + force: "yes" |
| 44 | + become: true |
| 45 | + become_user: "{{ matrix_user_username }}" |
| 46 | + register: matrix_bot_matrix_registration_bot_git_pull_results |
46 | 47 |
|
47 | | -- name: Ensure matrix-registration-bot image is built |
48 | | - community.docker.docker_image: |
49 | | - name: "{{ matrix_bot_matrix_registration_bot_docker_image }}" |
50 | | - source: build |
51 | | - force_source: "{{ matrix_bot_matrix_registration_bot_git_pull_results.changed if ansible_version.major > 2 or ansible_version.minor >= 8 else omit }}" |
52 | | - force: "{{ omit if ansible_version.major > 2 or ansible_version.minor >= 8 else matrix_bot_matrix_registration_bot_git_pull_results.changed }}" |
53 | | - build: |
54 | | - dockerfile: Dockerfile |
55 | | - path: "{{ matrix_bot_matrix_registration_bot_docker_src_files_path }}" |
56 | | - pull: true |
57 | | - when: "matrix_bot_matrix_registration_bot_container_image_self_build | bool" |
| 48 | + - name: Ensure matrix-registration-bot image is built |
| 49 | + community.docker.docker_image: |
| 50 | + name: "{{ matrix_bot_matrix_registration_bot_docker_image }}" |
| 51 | + source: build |
| 52 | + force_source: "{{ matrix_bot_matrix_registration_bot_git_pull_results.changed if ansible_version.major > 2 or ansible_version.minor >= 8 else omit }}" |
| 53 | + force: "{{ omit if ansible_version.major > 2 or ansible_version.minor >= 8 else matrix_bot_matrix_registration_bot_git_pull_results.changed }}" |
| 54 | + build: |
| 55 | + dockerfile: Dockerfile |
| 56 | + path: "{{ matrix_bot_matrix_registration_bot_docker_src_files_path }}" |
| 57 | + pull: true |
58 | 58 |
|
59 | 59 | - name: Ensure matrix-registration-bot container network is created |
60 | 60 | community.general.docker_network: |
|
0 commit comments