parent
1d9fae9d78
commit
ebbc0534fb
@ -0,0 +1,8 @@ |
||||
# Mirror |
||||
AFter setting up the vm this playbook will setup mirror's services |
||||
## Instructions |
||||
Install ansible then run the playbook |
||||
``` |
||||
apt install -y ansible |
||||
ansible-playbook main.yml |
||||
``` |
@ -0,0 +1,46 @@ |
||||
--- |
||||
# https://wiki.csclub.uwaterloo.ca/Mirror |
||||
# unsure that hosts does |
||||
- hosts: 127.0.0.1 |
||||
tasks: |
||||
- name: install dependencies |
||||
apt: |
||||
pkg: |
||||
- zfsutils-linux |
||||
- nginx |
||||
- rsync |
||||
- proftpd |
||||
state: latest |
||||
update_cache: true |
||||
- name: create zfs mountpoint |
||||
file: |
||||
# double check |
||||
path: /mirror/root/.cscmirror |
||||
state: directory |
||||
mode: 0777 |
||||
- name: create and mount zpool |
||||
# double check |
||||
# may be better to use the /dev/disk/by-id/... instead |
||||
commmand: zpool create -f -m /mirror/root/.cscmirror cscmirror raidz2 /dev/vdc /dev/vdd /dev/vde /dev/vdf |
||||
# may need to mount it (also check that it will automount on boot) |
||||
# zfs mount -a |
||||
- name: add rsync config |
||||
# right now we will just take configs from mirror |
||||
# later we will edit them as required |
||||
# |
||||
# create specific folder for each service |
||||
template: |
||||
src: rsync/rsyncd.conf.j2 |
||||
dest: /etc/rsyncd.conf |
||||
owner: root |
||||
group: root |
||||
mode: 0644 |
||||
template: |
||||
src: rsync/rsyncd-filter.conf.j2 |
||||
dest: /etc/rsyncd-filter.conf |
||||
owner: root |
||||
group: root |
||||
mode: 0644 |
||||
notify: restart rsync |
||||
|
||||
|
@ -0,0 +1 @@ |
||||
- .~tmp~ |
@ -0,0 +1,373 @@ |
||||
uid = nobody |
||||
gid = nogroup |
||||
use chroot = yes |
||||
max connections = 100 |
||||
socket options = SO_KEEPALIVE |
||||
motd file = /mirror/root/include/motd.msg |
||||
log file = /var/log/rsync.log |
||||
dont compress = * |
||||
refuse options = c delete |
||||
read only = true |
||||
|
||||
[mirror] |
||||
path = /mirror/root |
||||
comment = Everything |
||||
hosts allow = 129.97.0.0/16, 10.0.0.0/8, 172.16.0.0/12, 2620:101:f000::/47, fd74:6b6a:8eca::/47 |
||||
filter = merge /etc/rsyncd-filter.conf |
||||
|
||||
[alpine] |
||||
path = /mirror/root/alpine |
||||
comment = Alpine Linux |
||||
filter = merge /etc/rsyncd-filter.conf |
||||
|
||||
[almalinux] |
||||
path = /mirror/root/almalinux |
||||
comment = AlmaLinux |
||||
filter = merge /etc/rsyncd-filter.conf |
||||
|
||||
[apache] |
||||
path = /mirror/root/apache |
||||
comment = Apache software distribution |
||||
filter = merge /etc/rsyncd-filter.conf |
||||
|
||||
[archlinux] |
||||
path = /mirror/root/archlinux |
||||
comment = The Arch Linux archive |
||||
filter = merge /etc/rsyncd-filter.conf |
||||
|
||||
[centos] |
||||
path = /mirror/root/centos |
||||
comment = CentOS archive |
||||
filter = merge /etc/rsyncd-filter.conf |
||||
|
||||
[ceph] |
||||
path = /mirror/root/ceph |
||||
comment = Ceph |
||||
log file = /var/log/rsync.ceph.log |
||||
filter = merge /etc/rsyncd-filter.conf |
||||
|
||||
[CPAN] |
||||
path = /mirror/root/CPAN |
||||
comment = Comprehensive Perl Archive Network |
||||
filter = merge /etc/rsyncd-filter.conf |
||||
|
||||
[CRAN] |
||||
path = /mirror/root/CRAN |
||||
comment = complete CRAN ftp area |
||||
filter = merge /etc/rsyncd-filter.conf |
||||
|
||||
[CTAN] |
||||
path = /mirror/root/CTAN |
||||
comment = Comprehensive TeX Archive Network |
||||
filter = merge /etc/rsyncd-filter.conf |
||||
|
||||
[cygwin] |
||||
path = /mirror/root/cygwin |
||||
comment = cygwin ftp area |
||||
filter = merge /etc/rsyncd-filter.conf |
||||
|
||||
[damnsmalllinux] |
||||
path = /mirror/root/damnsmalllinux |
||||
comment = Damn Small Linux |
||||
filter = merge /etc/rsyncd-filter.conf |
||||
|
||||
[debian] |
||||
path = /mirror/root/debian |
||||
comment = Debian Linux |
||||
filter = merge /etc/rsyncd-filter.conf |
||||
|
||||
[debian-backports] |
||||
path = /mirror/root/debian-backports |
||||
comment = Backports.org |
||||
filter = merge /etc/rsyncd-filter.conf |
||||
|
||||
[debian-cd] |
||||
path = /mirror/root/debian-cd |
||||
comment = Debian CD images |
||||
filter = merge /etc/rsyncd-filter.conf |
||||
|
||||
[debian-multimedia] |
||||
path = /mirror/root/debian-multimedia |
||||
comment = Debian multimedia repository |
||||
filter = merge /etc/rsyncd-filter.conf |
||||
|
||||
[debian-security] |
||||
path = /mirror/root/debian-security |
||||
comment = Debian security archive |
||||
filter = merge /etc/rsyncd-filter.conf |
||||
|
||||
[eclipse] |
||||
path = /mirror/root/eclipse |
||||
comment = Eclipse Mirror |
||||
filter = merge /etc/rsyncd-filter.conf |
||||
|
||||
[emacsconf] |
||||
path = /mirror/root/emacsconf |
||||
comment = EmacsConf Mirror |
||||
filter = merge /etc/rsyncd-filter.conf |
||||
|
||||
[emdebian] |
||||
path = /mirror/root/emdebian |
||||
comment = emdebian archive |
||||
filter = merge /etc/rsyncd-filter.conf |
||||
|
||||
[fedora] |
||||
path = /mirror/root/fedora |
||||
comment = Fedora |
||||
filter = merge /etc/rsyncd-filter.conf |
||||
|
||||
[fedora-enchilada] |
||||
path = /mirror/root/fedora |
||||
comment = the ENTIRE Fedora Repository |
||||
filter = merge /etc/rsyncd-filter.conf |
||||
|
||||
[FreeBSD] |
||||
path = /mirror/root/FreeBSD |
||||
comment = FreeBSD archive |
||||
filter = merge /etc/rsyncd-filter.conf |
||||
|
||||
[gentoo-distfiles] |
||||
path = /mirror/root/gentoo-distfiles |
||||
comment = Gentoo Linux source tree |
||||
filter = merge /etc/rsyncd-filter.conf |
||||
|
||||
[gentoo-portage] |
||||
path = /mirror/root/gentoo-portage |
||||
comment = Gentoo Linux Portage tree mirror |
||||
exclude = distfiles |
||||
filter = merge /etc/rsyncd-filter.conf |
||||
|
||||
[gnome] |
||||
path = /mirror/root/gnome |
||||
comment = GNOME Project |
||||
filter = merge /etc/rsyncd-filter.conf |
||||
|
||||
[gnu] |
||||
path = /mirror/root/gnu |
||||
comment = The GNU archive |
||||
filter = merge /etc/rsyncd-filter.conf |
||||
|
||||
[gutenberg] |
||||
path = /mirror/root/gutenberg |
||||
comment = Project Gutenberg |
||||
filter = merge /etc/rsyncd-filter.conf |
||||
|
||||
[kali] |
||||
path = /mirror/root/kali |
||||
comment = Kali Linux |
||||
filter = merge /etc/rsyncd-filter.conf |
||||
|
||||
[kali-images] |
||||
path = /mirror/root/kali-images |
||||
comment = Kali Linux Images |
||||
filter = merge /etc/rsyncd-filter.conf |
||||
|
||||
[kde] |
||||
path = /mirror/root/kde |
||||
comment = KDE |
||||
filter = merge /etc/rsyncd-filter.conf |
||||
|
||||
[kde-applicationdata] |
||||
path = /mirror/root/kde-applicationdata |
||||
comment = KDE |
||||
filter = merge /etc/rsyncd-filter.conf |
||||
|
||||
[kdeftp] |
||||
path = /mirror/root/kde |
||||
comment = KDE ftp area |
||||
filter = merge /etc/rsyncd-filter.conf |
||||
|
||||
[kernel.org] |
||||
path = /mirror/root/kernel.org |
||||
comment = The kernel.org archive |
||||
filter = merge /etc/rsyncd-filter.conf |
||||
|
||||
[linuxmint] |
||||
path = /mirror/root/linuxmint |
||||
comment = Linux Mint |
||||
filter = merge /etc/rsyncd-filter.conf |
||||
|
||||
[linuxmint-packages] |
||||
path = /mirror/root/linuxmint-packages |
||||
comment = Linux Mint packages |
||||
filter = merge /etc/rsyncd-filter.conf |
||||
|
||||
[MacPorts] |
||||
path = /mirror/root/MacPorts |
||||
comment = MacPorts |
||||
filter = merge /etc/rsyncd-filter.conf |
||||
|
||||
[macports] |
||||
path = /mirror/root/MacPorts |
||||
comment = MacPorts |
||||
filter = merge /etc/rsyncd-filter.conf |
||||
|
||||
[mysql] |
||||
path = /mirror/root/mysql |
||||
comment = MySQL mirror |
||||
filter = merge /etc/rsyncd-filter.conf |
||||
|
||||
[NetBSD] |
||||
path = /mirror/root/NetBSD |
||||
comment = NetBSD |
||||
filter = merge /etc/rsyncd-filter.conf |
||||
|
||||
[nongnu] |
||||
path = /mirror/root/nongnu |
||||
comment = The non-GNU archive |
||||
filter = merge /etc/rsyncd-filter.conf |
||||
|
||||
[OpenBSD] |
||||
path = /mirror/root/OpenBSD |
||||
comment = OpenBSD |
||||
filter = merge /etc/rsyncd-filter.conf |
||||
|
||||
[openoffice] |
||||
path = /mirror/root/openoffice |
||||
comment = openoffice.org file tree |
||||
filter = merge /etc/rsyncd-filter.conf |
||||
|
||||
[opensuse] |
||||
path = /mirror/root/opensuse |
||||
comment = opensuse-full |
||||
filter = merge /etc/rsyncd-filter.conf |
||||
|
||||
[puppylinux] |
||||
path = /mirror/root/puppylinux |
||||
comment = Puppy Linux |
||||
filter = merge /etc/rsyncd-filter.conf |
||||
|
||||
[racket] |
||||
path = /mirror/root/racket |
||||
comment = Racket |
||||
filter = merge /etc/rsyncd-filter.conf |
||||
|
||||
[plt-bundles] |
||||
path = /mirror/root/racket/plt-bundles |
||||
comment = plt-bundles |
||||
filter = merge /etc/rsyncd-filter.conf |
||||
|
||||
[racket-installers] |
||||
path = /mirror/root/racket/racket-installers |
||||
comment = racket-installers |
||||
filter = merge /etc/rsyncd-filter.conf |
||||
|
||||
[raspbian] |
||||
path = /mirror/root/raspbian |
||||
comment = Raspberry Pi |
||||
filter = merge /etc/rsyncd-filter.conf |
||||
|
||||
[raspberrypi] |
||||
path = /mirror/root/raspberrypi |
||||
comment = raspberrypi |
||||
filter = merge /etc/rsyncd-filter.conf |
||||
|
||||
[qtproject] |
||||
path = /mirror/root/qtproject |
||||
comment = Qt Project |
||||
filter = merge /etc/rsyncd-filter.conf |
||||
|
||||
[sage] |
||||
path = /mirror/root/sage |
||||
comment = Sage Computer Algebra System |
||||
filter = merge /etc/rsyncd-filter.conf |
||||
|
||||
[saltstack] |
||||
path = /mirror/root/saltstack |
||||
comment = Saltstack |
||||
filter = merge /etc/rsyncd-filter.conf |
||||
|
||||
[slackware] |
||||
path = /mirror/root/slackware |
||||
comment = Slackware Linux |
||||
filter = merge /etc/rsyncd-filter.conf |
||||
|
||||
[tdf] |
||||
path = /mirror/root/tdf |
||||
comment = The Document Foundation |
||||
filter = merge /etc/rsyncd-filter.conf |
||||
|
||||
[ubuntu] |
||||
path = /mirror/root/ubuntu |
||||
comment = Ubuntu Archive |
||||
filter = merge /etc/rsyncd-filter.conf |
||||
|
||||
[ubuntu-ports] |
||||
path = /mirror/root/ubuntu-ports |
||||
comment = Ubuntu-ports Archive |
||||
filter = merge /etc/rsyncd-filter.conf |
||||
|
||||
[ubuntu-ports-releases] |
||||
path = /mirror/root/ubuntu-ports |
||||
comment = Ubuntu-ports Release CD Images |
||||
filter = merge /etc/rsyncd-filter.conf |
||||
|
||||
[ubuntu-releases] |
||||
path = /mirror/root/ubuntu-releases |
||||
comment = Ubuntu Release CD Images |
||||
filter = merge /etc/rsyncd-filter.conf |
||||
|
||||
[xiph] |
||||
path = /mirror/root/xiph |
||||
comment = Xiph |
||||
filter = merge /etc/rsyncd-filter.conf |
||||
|
||||
[x.org] |
||||
path = /mirror/root/x.org |
||||
comment = X.org archive |
||||
filter = merge /etc/rsyncd-filter.conf |
||||
|
||||
[xorg-archive] |
||||
path = /mirror/root/x.org |
||||
comment = X.Org archive |
||||
filter = merge /etc/rsyncd-filter.conf |
||||
|
||||
[xubuntu-releases] |
||||
path = /mirror/root/xubuntu-releases |
||||
comment = Xubuntu Release CD Images |
||||
filter = merge /etc/rsyncd-filter.conf |
||||
|
||||
[csclub] |
||||
path = /mirror/root/csclub |
||||
comment = CS Club Files |
||||
filter = merge /etc/rsyncd-filter.conf |
||||
|
||||
[mprelease] |
||||
path = /mirror/root/MacPorts/release |
||||
comment= MacPorts Release |
||||
filter = merge /etc/rsyncd-filter.conf |
||||
|
||||
[mpdistfiles] |
||||
path = /mirror/root/MacPorts/mpdistfiles |
||||
comment= MacPorts Dist files |
||||
filter = merge /etc/rsyncd-filter.conf |
||||
|
||||
[vlc] |
||||
path = /mirror/root/vlc |
||||
comment = VideoLAN Project |
||||
filter = merge /etc/rsyncd-filter.conf |
||||
|
||||
[ipfire] |
||||
path = /mirror/root/ipfire |
||||
comment = IPFire Project |
||||
filter = merge /etc/rsyncd-filter.conf |
||||
|
||||
[manjaro] |
||||
path = /mirror/root/manjaro |
||||
comment = Manjaro Linux |
||||
filter = merge /etc/rsyncd-filter.conf |
||||
|
||||
[parabola] |
||||
path = /mirror/root/parabola |
||||
comment = Parabola GNU/Linux-libre |
||||
filter = merge /etc/rsyncd-filter.conf |
||||
|
||||
[hyperbola] |
||||
path = /mirror/root/hyperbola |
||||
comment = Hyperbola |
||||
filter = merge /etc/rsyncd-filter.conf |
||||
|
||||
[trisquel] |
||||
path = /mirror/root/trisquel |
||||
comment = Trisquel GNU/Linux |
||||
filter = merge /etc/rsyncd-filter.conf |
Loading…
Reference in new issue