system-config/playbooks/roles/reprepro/tasks/docker.yaml
Clark Boylan 4985d3f78c Add Jammy Docker package mirroring
This adds package mirroring for Jammy Docker packages. One of the (I'm
sure) many steps to spin up Jammy in our CI environment.

Change-Id: I2c3fe6fed07ac36aa65b6f060012705ff940f69a
2022-04-26 11:18:23 -07:00

39 lines
1.3 KiB
YAML

- name: Deploy Docker key
include_tasks: utils/keys.yaml
vars:
_keys:
- { key_id: '0EBFCD88', file: 'debian-docker.asc' }
# Unfortunately docker upstream doesn't do the pool model correctly,
# and we have to mirror each distro separately to avoid file
# conflicts (they have the same .deb files)
- name: Copy Debian Docker Xenial config
include_tasks: utils/copy-config.yaml
vars:
_dir: 'debian-docker-xenial'
- name: Copy Debian Docker Bionic
include_tasks: utils/copy-config.yaml
vars:
_dir: 'debian-docker-bionic'
- name: Copy Debian Docker Focal config
include_tasks: utils/copy-config.yaml
vars:
_dir: 'debian-docker-focal'
- name: Copy Debian Docker Jammy config
include_tasks: utils/copy-config.yaml
vars:
_dir: 'debian-docker-jammy'
# Beacuse they all live on the same volume, run in order
- name: Install update cron jobs
cron:
name: 'Debian Docker reprepro mirror sync'
job: 'flock -n /var/run/reprepro/debian-docker.lock bash -c "for DISTRO in xenial bionic focal jammy; do reprepro-mirror-update /etc/reprepro/debian-docker-\$DISTRO mirror.deb-docker >>/var/log/reprepro/debian-docker-\$DISTRO-mirror.log 2>&1; done"'
state: present
hour: '*/2'
minute: '{{ 45 | random(seed=inventory_hostname) }}'