podman: Support registry mirror

Change-Id: Ifc09da0b48d950fe010229c484f5f0a33b8648b8
This commit is contained in:
Michal Nasiadka 2023-10-31 09:52:03 +01:00
parent 0ca12aaa0e
commit f950460a17
2 changed files with 17 additions and 1 deletions

View File

@ -15,5 +15,8 @@ podman_runtime_directory:
podman_registry:
podman_registry_insecure: false
# Path to a CA file for Docker registry
# Podman registry mirror
podman_registry_mirror:
# Path to a CA file for registry
podman_registry_ca:

View File

@ -23,6 +23,19 @@
mode: 0644
when: podman_registry is not none
- name: Write registry mirror config
become: True
vars:
registry_mirror: |
[[registry.mirror]]
prefix = docker.io
location = "{{ podman_registry_mirror }}"
copy:
content: "{{ registry_mirror }}"
dest: /etc/containers/registries.conf.d/registry-mirror.conf
mode: 0644
when: podman_registry_mirror is not none
- name: Write storage config
become: True
vars: