add mirror role and enable syncs on mirror group

This commit is contained in:
Timo Makinen 2019-05-11 01:57:50 +03:00
parent b2c634425b
commit 278f2deb92
7 changed files with 277 additions and 0 deletions

View file

@ -0,0 +1,3 @@
---
rsyncoptions: []
postcmd: ""

View file

@ -0,0 +1,3 @@
---
dependencies:
- {role: mirror/base}

View file

@ -0,0 +1,18 @@
---
- name: create config for {{ label }}
template:
dest: "/etc/sync-mirrors/{{ label }}.conf"
src: mirror.conf.j2
mode: 0644
owner: root
group: root
- name: create target directory
file:
path: "/srv/mirrors/{{ label }}"
state: directory
mode: 0755
owner: mirror
group: mirror

View file

@ -0,0 +1,2 @@
SRC="{{ source }}"
RSYNCOPTS="{{ rsyncoptions | join(' ') }}"