mirror-env/mirror/main.yml

47 lines
1.2 KiB
YAML

---
# 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