Fix rageshake self-building

BuildX is required for building this container image.
This commit is contained in:
Slavi Pantaleev 2023-02-25 13:09:53 +02:00
parent 39be2ef71a
commit 4c64e092d0

View file

@ -7,12 +7,12 @@
owner: "{{ matrix_user_username }}" owner: "{{ matrix_user_username }}"
group: "{{ matrix_user_groupname }}" group: "{{ matrix_user_groupname }}"
with_items: with_items:
- { path: "{{ matrix_rageshake_config_path }}", when: true } - path: "{{ matrix_rageshake_config_path }}"
- { path: "{{ matrix_rageshake_data_path }}", when: true } when: true
- { - path: "{{ matrix_rageshake_data_path }}"
path: "{{ matrix_rageshake_container_src_files_path }}", when: true
when: matrix_rageshake_container_image_self_build, - path: "{{ matrix_rageshake_container_src_files_path }}"
} when: matrix_rageshake_container_image_self_build | bool
when: "item.when | bool" when: "item.when | bool"
- name: Ensure rageshake config file created - name: Ensure rageshake config file created
@ -46,17 +46,14 @@
register: matrix_rageshake_git_pull_results register: matrix_rageshake_git_pull_results
when: "matrix_rageshake_container_image_self_build | bool" when: "matrix_rageshake_container_image_self_build | bool"
- name: Ensure rageshake image is built - name: Ensure rageshake container image is built
community.docker.docker_image: ansible.builtin.command:
name: "{{ matrix_rageshake_container_image }}" cmd: |-
source: build {{ devture_systemd_docker_base_host_command_docker }} buildx build
force_source: "{{ matrix_rageshake_git_pull_results.changed if ansible_version.major > 2 or ansible_version.minor >= 8 else omit }}" --tag={{ matrix_rageshake_container_image }}
force: "{{ omit if ansible_version.major > 2 or ansible_version.minor >= 8 else matrix_mailer_git_pull_results.changed }}" --file={{ matrix_rageshake_container_src_files_path }}/Dockerfile
build: {{ matrix_rageshake_container_src_files_path }}
dockerfile: Dockerfile when: matrix_rageshake_container_image_self_build | bool
path: "{{ matrix_rageshake_container_src_files_path }}"
pull: true
when: "matrix_rageshake_container_image_self_build | bool"
- name: Ensure matrix-rageshake.service installed - name: Ensure matrix-rageshake.service installed
ansible.builtin.template: ansible.builtin.template: