system-config/playbooks/roles/reprepro/tasks/docker.yaml

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) }}'