88 lines
2.5 KiB
YAML
88 lines
2.5 KiB
YAML
---
|
|
- import_playbook: "include/deploy-kvm-guest.yml myhosts=mirror"
|
|
|
|
- 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: python3 /usr/local/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=Modular"
|
|
- "--exclude=SRPMS"
|
|
- "--exclude=aarch64"
|
|
- "--exclude=source"
|
|
- "--exclude=armhfp"
|
|
- "--exclude=debug"
|
|
- "--delete-excluded"
|
|
postcmd: python3 /usr/local/bin/report_mirror
|
|
- role: mirror/sync
|
|
label: openbsd
|
|
source: "rsync://rsync.nic.funet.fi/ftp/pub/mirrors/\
|
|
ftp.openbsd.org/pub/OpenBSD/"
|
|
rsyncoptions:
|
|
- "--include=/?.?/"
|
|
- "--include=/?.?/amd64/"
|
|
- "--include=/?.?/amd64/*"
|
|
- "--include=/?.?/packages/"
|
|
- "--include=/?.?/packages/amd64/"
|
|
- "--include=/?.?/packages/amd64/*"
|
|
- "--include=/?.?/packages-stable/"
|
|
- "--include=/?.?/packages-stable/amd64/"
|
|
- "--include=/?.?/packages-stable/amd64/*"
|
|
- "--include=/syspatch/"
|
|
- "--include=/syspatch/?.?/"
|
|
- "--include=/syspatch/?.?/amd64/"
|
|
- "--include=/syspatch/?.?/amd64/*"
|
|
- "--exclude=*"
|
|
- "--delete-excluded"
|
|
|
|
tasks:
|
|
- name: link foo.sh yum repo to web
|
|
file:
|
|
dest: /srv/web/{{ inventory_hostname }}/foo.sh
|
|
src: /srv/mirrors/foo.sh
|
|
state: link
|
|
owner: root
|
|
group: "{{ ansible_wheel }}"
|
|
follow: false
|