enable rsync daemon
This commit is contained in:
parent
517fb38ae5
commit
adde77eb88
|
@ -1,5 +1,5 @@
|
||||||
# Mirror
|
# Mirror
|
||||||
AFter setting up the vm this playbook will setup mirror's services
|
After setting up the vm this playbook will setup mirror's services
|
||||||
## Instructions
|
## Instructions
|
||||||
Install ansible then run the playbook
|
Install ansible then run the playbook
|
||||||
```
|
```
|
||||||
|
|
|
@ -1,5 +1,14 @@
|
||||||
---
|
---
|
||||||
# https://wiki.csclub.uwaterloo.ca/Mirror
|
# https://wiki.csclub.uwaterloo.ca/Mirror
|
||||||
|
#
|
||||||
|
# may want to split this into multiple files
|
||||||
|
#
|
||||||
|
# right now we will just take configs from mirror
|
||||||
|
# later we will edit them as required
|
||||||
|
#
|
||||||
|
# user should running this as root:root
|
||||||
|
# so unsure if need to set owner:group for files/dirs
|
||||||
|
#
|
||||||
# unsure that hosts does
|
# unsure that hosts does
|
||||||
- hosts: 127.0.0.1
|
- hosts: 127.0.0.1
|
||||||
tasks:
|
tasks:
|
||||||
|
@ -7,28 +16,32 @@
|
||||||
apt:
|
apt:
|
||||||
pkg:
|
pkg:
|
||||||
- zfsutils-linux
|
- zfsutils-linux
|
||||||
- nginx
|
|
||||||
- rsync
|
- rsync
|
||||||
|
- nginx
|
||||||
- proftpd
|
- proftpd
|
||||||
state: latest
|
state: latest
|
||||||
update_cache: true
|
update_cache: true
|
||||||
|
state: started
|
||||||
- name: create zfs mountpoint
|
- name: create zfs mountpoint
|
||||||
file:
|
file:
|
||||||
# double check
|
|
||||||
path: /mirror/root/.cscmirror
|
path: /mirror/root/.cscmirror
|
||||||
state: directory
|
state: directory
|
||||||
|
owner: root
|
||||||
|
group: root
|
||||||
mode: 0777
|
mode: 0777
|
||||||
|
recurse: yes
|
||||||
- name: create and mount zpool
|
- name: create and mount zpool
|
||||||
# double check
|
# double check this works (and produces the correct result)
|
||||||
# may be better to use the /dev/disk/by-id/... instead
|
# 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
|
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)
|
# may need to mount it (also check that it will automount on boot)
|
||||||
# zfs mount -a
|
# zfs mount -a
|
||||||
|
- name: enable and start rsync daemon
|
||||||
|
systemd:
|
||||||
|
name: rsync
|
||||||
|
enabled: true
|
||||||
|
state: started
|
||||||
- name: add rsync config
|
- 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:
|
template:
|
||||||
src: rsync/rsyncd.conf.j2
|
src: rsync/rsyncd.conf.j2
|
||||||
dest: /etc/rsyncd.conf
|
dest: /etc/rsyncd.conf
|
||||||
|
@ -43,4 +56,3 @@
|
||||||
mode: 0644
|
mode: 0644
|
||||||
notify: restart rsync
|
notify: restart rsync
|
||||||
|
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue