From 3468f6a7ca6e989f96c88b8331e3a1d017e17f4e Mon Sep 17 00:00:00 2001 From: shirenn <shirenn@crans.org> Date: Tue, 1 Jun 2021 17:52:35 +0200 Subject: [PATCH] [mirror] --- host_vars/eclat.adm.crans.org.yml | 15 ++++++ plays/mirror.yml | 88 ++++++------------------------- 2 files changed, 31 insertions(+), 72 deletions(-) create mode 100644 host_vars/eclat.adm.crans.org.yml diff --git a/host_vars/eclat.adm.crans.org.yml b/host_vars/eclat.adm.crans.org.yml new file mode 100644 index 00000000..d7e64f09 --- /dev/null +++ b/host_vars/eclat.adm.crans.org.yml @@ -0,0 +1,15 @@ +--- +interfaces: + adm: ens18 + srv_nat: ens19 + san: ens20 + +loc_ftpsync: {} +loc_rsync_mirror: {} + +loc_rsyncd: + modules: + - name: mirror + path: /mirror/pub/ + comment: CR@NS MIRROR + hosts_allow: "*" diff --git a/plays/mirror.yml b/plays/mirror.yml index 56f83b3c..6432626c 100755 --- a/plays/mirror.yml +++ b/plays/mirror.yml @@ -1,79 +1,23 @@ #!/usr/bin/env ansible-playbook --- -# Debian and Ubuntu mirrors -- hosts: charybde.adm.crans.org +- hosts: mirror_backend vars: - ftpsync: - - name: main - dest: /pubftp/pub/debian/ - cron_time: "25 1,13" - rsync_host: syncproxy.eu.debian.org - rsync_path: debian - - # https://lists.debian.org/debian-mirrors-announce/2020/03/msg00000.html - - name: security - dest: /pubftp/pub/debian-security/ - cron_time: "40 *" - rsync_host: rsync.security.debian.org - rsync_path: debian-security - - - name: backports - dest: /pubftp/pub/debian-backports/ - cron_time: " 7 3,15" - rsync_host: syncproxy.eu.debian.org - rsync_path: debian-backports - - - name: ubuntu - dest: /pubftp/pub/ubuntu/ - cron_time: "55 5,17" - rsync_host: archive.ubuntu.com - rsync_path: ubuntu - - rsync_mirror: - - name: videolan - dest: /pubftp/pub/videolan - cron_time: "03 10,14,18,22,2,6" - rsync_host: rsync.videolan.org - rsync_path: videolan-ftp - - - name: debian - dest: /pubftp/pub/distributions/linux/debian - cron_time: "00 5" - rsync_host: cdimage.debian.org - rsync_path: cdimage/release - - - name: ubuntu - dest: /pubftp/pub/distributions/linux/ubuntu - cron_time: "00 5" - rsync_host: cdimage.ubuntu.com - rsync_path: cdimage/releases - - - name: xubuntu - dest: /pubftp/pub/distributions/linux/xubuntu - cron_time: "00 5" - rsync_host: cdimage.ubuntu.com - rsync_path: cdimage/xubuntu/releases - - - name: kubuntu - dest: /pubftp/pub/distributions/linux/kubuntu - cron_time: "00 5" - rsync_host: cdimage.ubuntu.com - rsync_path: cdimage/kubuntu/releases - - - name: lubuntu - dest: /pubftp/pub/distributions/linux/lubuntu - cron_time: "00 5" - rsync_host: cdimage.ubuntu.com - rsync_path: cdimage/lubuntu/releases - - - name: ubuntu-mate - dest: /pubftp/pub/distributions/linux/ubuntu-mate - cron_time: "00 5" - rsync_host: cdimage.ubuntu.com - rsync_path: cdimage/ubuntu-mate/releases - - nginx: '{{ glob_nginx | default({}) | combine(loc_nginx | default({})) }}' + ftpsync: '{{ glob_ftpsync | default({}) | combine(loc_ftpsync | default({})) }}' + rsync_mirror: '{{ glob_rsync_mirror | default({}) | combine(loc_rsync_mirror | default({})) }}' + apt_mirror: '{{ glob_apt_mirror | default({}) | combine(loc_apt_mirror | default({})) }}' roles: - ftpsync - rsync-mirror + - apt-mirror + +- hosts: mirror_frontend + vars: + nginx: '{{ glob_nginx | default({}) | combine(loc_nginx | default({})) }}' + roles: - nginx + +- hosts: rsyncd + vars: + rsyncd: '{{ glob_rsyncd | default({}) | combine(loc_rsyncd | default({})) }}' + roles: + - rsyncd -- GitLab