ansible/playbooks/mirror.yml

71 lines
1.9 KiB
YAML

---
- import_playbook: "include/deploy-kvm-guest.yml myhosts=mirror01.home.foo.sh"
- name: configure instance
hosts: mirror
user: root
gather_facts: true
vars_files:
- "{{ ansible_private }}/vars.yml"
pre_tasks:
- name: mount /export
mount:
name: /export
src: LABEL=/export
fstype: xfs
opts: noatime,noexec,nosuid,nodev
passno: 1
dump: 0
state: mounted
roles:
- base
- mirror/base
- mirror/thinlinc
- role: mirror/reportmirror
hostname: mirrors.foo.sh
mirrors: [epel, fedora]
sitename: foo.sh
password: "{{ report_mirror_pass }}"
- role: mirror/sync
label: fedora-epel
source: "rsync://rsync.nic.funet.fi/ftp/pub/mirrors/\
fedora.redhat.com/pub/epel"
rsyncoptions:
- "--exclude=SRPMS"
- "--exclude=debug"
- "--delete-excluded"
postcmd: /usr/bin/report_mirror
- role: mirror/sync
label: fedora
source: "rsync://rsync.nic.funet.fi/ftp/pub/mirrors/\
fedora.redhat.com/pub/fedora/linux/"
rsyncoptions:
- "--exclude=/atomic"
- "--exclude=/development"
- "--exclude=/releases/test"
- "--exclude=/updates/testing"
- "--exclude=Live"
- "--exclude=SRPMS"
- "--exclude=source"
- "--exclude=armhfp"
- "--exclude=debug"
- "--delete-excluded"
postcmd: /usr/bin/report_mirror
- role: mirror/sync
label: openbsd
source: "rsync://ftp.eenet.ee/OpenBSD/"
rsyncoptions:
- "--include=/?.?/"
- "--include=/?.?/packages/"
- "--include=/?.?/packages/amd64/"
- "--include=/?.?/packages/amd64/*"
- "--include=/syspatch/"
- "--include=/syspatch/?.?/"
- "--include=/syspatch/?.?/amd64/"
- "--include=/syspatch/?.?/amd64/*"
- "--exclude=*"
- "--delete-excluded"
- role: rsync/server