From ac2540fc8133bcb34333a3e4af3bb54690190ac6 Mon Sep 17 00:00:00 2001 From: Yohann D'ANELLO <ynerant@crans.org> Date: Tue, 13 Jul 2021 22:06:46 +0200 Subject: [PATCH] [debian_images] Adapt configuration for gulp/charybde Signed-off-by: Yohann D'ANELLO <ynerant@crans.org> --- group_vars/virtu.yml | 3 ++- host_vars/gulp.cachan-adm.crans.org.yml | 1 + roles/proxmox-debian-images/tasks/main.yml | 2 +- roles/proxmox-debian-images/templates/cron.d/debian-images.j2 | 2 +- 4 files changed, 5 insertions(+), 3 deletions(-) diff --git a/group_vars/virtu.yml b/group_vars/virtu.yml index b999a504..f97bbfe8 100644 --- a/group_vars/virtu.yml +++ b/group_vars/virtu.yml @@ -1,4 +1,5 @@ --- glob_debian_images: cron_timer: '39 06 * * *' - rsync_host: "eclat.adm.crans.org" + rsync_host: 'eclat.adm.crans.org' + rsync_module: 'mirror' diff --git a/host_vars/gulp.cachan-adm.crans.org.yml b/host_vars/gulp.cachan-adm.crans.org.yml index b44167ae..ce3a5eb0 100644 --- a/host_vars/gulp.cachan-adm.crans.org.yml +++ b/host_vars/gulp.cachan-adm.crans.org.yml @@ -13,6 +13,7 @@ proxmox_mirror: http://mirror.cachan-adm.crans.org/proxmox/debian/pve loc_debian_images: rsync_host: 'mirror.cachan-adm.crans.org' + rsync_module: 'ftp' loc_postgres: subnets: diff --git a/roles/proxmox-debian-images/tasks/main.yml b/roles/proxmox-debian-images/tasks/main.yml index a21c22ff..043d6008 100644 --- a/roles/proxmox-debian-images/tasks/main.yml +++ b/roles/proxmox-debian-images/tasks/main.yml @@ -13,6 +13,6 @@ until: apt_result is succeeded - name: Initial synchronization to download Debian images - shell: "rsync --verbose --dirs --compress --times --update --delete-after --delete-excluded --include 'debian-[0-9]*-amd64-netinst.iso' --exclude '*' rsync://eclat.adm.crans.org/mirror/cdimage-debian/release/current/amd64/iso-cd/ /var/lib/vz/template/iso/" + shell: "rsync --verbose --dirs --compress --times --update --delete-after --delete-excluded --include 'debian-[0-9]*-amd64-netinst.iso' --exclude '*' rsync://{{ debian_images.rsync_host }}/{{ debian_images.rsync_module }}/cdimage-debian/release/current/amd64/iso-cd/ /var/lib/vz/template/iso/" register: rsync_output changed_when: '"debian" in rsync_output.stdout' diff --git a/roles/proxmox-debian-images/templates/cron.d/debian-images.j2 b/roles/proxmox-debian-images/templates/cron.d/debian-images.j2 index bec7e9f6..955a36f2 100644 --- a/roles/proxmox-debian-images/templates/cron.d/debian-images.j2 +++ b/roles/proxmox-debian-images/templates/cron.d/debian-images.j2 @@ -1,3 +1,3 @@ {{ ansible_header | comment }} -{{ debian_images.cron_timer }} root rsync --info=name1 --dirs --compress --times --update --delete-after --delete-excluded --include 'debian-[0-9]*-amd64-netinst.iso' --exclude '*' rsync://{{ debian_images.rsync_host }}/mirror/cdimage-debian/release/current/amd64/iso-cd/ /var/lib/vz/template/iso/ +{{ debian_images.cron_timer }} root rsync --info=name1 --dirs --compress --times --update --delete-after --delete-excluded --include 'debian-[0-9]*-amd64-netinst.iso' --exclude '*' rsync://{{ debian_images.rsync_host }}/{{ debian_images.rsync_module }}/cdimage-debian/release/current/amd64/iso-cd/ /var/lib/vz/template/iso/ -- GitLab