my-containers/build_generic_images.yaml

44 lines
1.1 KiB
YAML

- name: Build generic containers - base python and ci
hosts: localhost
gather_facts: false
vars:
force: false
force_rm: false
cache: false
registry: code.philo.ydns.eu
organisation: philorg
tasks:
- name: Using the variables
ansible.builtin.debug:
var: force_rm
- name: Build the base image (trixie_python)
containers.podman.podman_image:
name: trixie_python
state: build
path: "{{ playbook_dir }}"
tag: 1
build:
format: oci
force_rm: "{{ force_rm }}"
cache: "{{ cache }}"
file: Containerfile.trixie_python
push: true
push_args:
dest: "{{ registry }}/{{ organisation }}/trixie_python"
- name: Build the image for ci
containers.podman.podman_image:
name: python-ci
state: build
path: "{{ playbook_dir }}"
tag: 1
build:
format: oci
force_rm: "{{ force_rm }}"
cache: "{{ cache }}"
file: Containerfile.ci
push: true
push_args:
dest: "{{ registry }}/{{ organisation }}/python-ci"