Move setup to build multiarch containers into dedicated role
This change moves the QEMU configuration for multiarch builds into a dedicated role. Furthermore the execution will always be treated as unchanged, unless an error occured!
This commit is contained in:
7
main.yml
7
main.yml
@@ -24,13 +24,10 @@
|
|||||||
tags: [packages]
|
tags: [packages]
|
||||||
- role: roles/helm-diff
|
- role: roles/helm-diff
|
||||||
tags: [packages]
|
tags: [packages]
|
||||||
|
- role: roles/multiarch-container-builds
|
||||||
|
tags: [packages]
|
||||||
tasks:
|
tasks:
|
||||||
- name: Dump hostvars
|
- name: Dump hostvars
|
||||||
tags: [never, dump]
|
tags: [never, dump]
|
||||||
debug:
|
debug:
|
||||||
var: hostvars[inventory_hostname]
|
var: hostvars[inventory_hostname]
|
||||||
- name: Configure QEMU for multiarch podman builds
|
|
||||||
tags: [packages]
|
|
||||||
become: yes
|
|
||||||
shell: podman run --rm --privileged docker.io/multiarch/qemu-user-static --reset -p yes
|
|
||||||
when: ansible_os_family == 'Debian'
|
|
||||||
|
|||||||
5
roles/multiarch-container-builds/tasks/main.yml
Normal file
5
roles/multiarch-container-builds/tasks/main.yml
Normal file
@@ -0,0 +1,5 @@
|
|||||||
|
- name: Ensure QEMU configuration for multiarch podman builds
|
||||||
|
become: yes
|
||||||
|
shell: podman run --rm --privileged docker.io/multiarch/qemu-user-static --reset -p yes
|
||||||
|
changed_when: False
|
||||||
|
when: ansible_os_family == 'Debian'
|
||||||
Reference in New Issue
Block a user