add mirror role and enable syncs on mirror group
This commit is contained in:
parent
b2c634425b
commit
278f2deb92
7 changed files with 277 additions and 0 deletions
3
roles/mirror/sync/defaults/main.yml
Normal file
3
roles/mirror/sync/defaults/main.yml
Normal file
|
@ -0,0 +1,3 @@
|
|||
---
|
||||
rsyncoptions: []
|
||||
postcmd: ""
|
3
roles/mirror/sync/meta/main.yml
Normal file
3
roles/mirror/sync/meta/main.yml
Normal file
|
@ -0,0 +1,3 @@
|
|||
---
|
||||
dependencies:
|
||||
- {role: mirror/base}
|
18
roles/mirror/sync/tasks/main.yml
Normal file
18
roles/mirror/sync/tasks/main.yml
Normal 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
|
2
roles/mirror/sync/templates/mirror.conf.j2
Normal file
2
roles/mirror/sync/templates/mirror.conf.j2
Normal file
|
@ -0,0 +1,2 @@
|
|||
SRC="{{ source }}"
|
||||
RSYNCOPTS="{{ rsyncoptions | join(' ') }}"
|
Loading…
Add table
Add a link
Reference in a new issue