94 lines
2.7 KiB
YAML
94 lines
2.7 KiB
YAML
---
|
|
- name: Deploy KVM virtual machines
|
|
ansible.builtin.import_playbook: include/deploy-kvm-guest.yml
|
|
vars:
|
|
myhosts: mirror
|
|
|
|
- name: Configure instance
|
|
hosts: mirror
|
|
user: root
|
|
gather_facts: true
|
|
|
|
vars_files:
|
|
- "{{ ansible_private }}/vars.yml"
|
|
|
|
pre_tasks:
|
|
- name: Mount /export
|
|
ansible.posix.mount:
|
|
name: /export
|
|
src: LABEL=/export
|
|
fstype: xfs
|
|
opts: noatime,noexec,nosuid,nodev
|
|
passno: "1"
|
|
dump: "0"
|
|
state: mounted
|
|
|
|
roles:
|
|
- base
|
|
- mirror/base
|
|
- thinlinc_mirror
|
|
- role: reportmirror
|
|
reportmirror_hostname: mirrors.foo.sh
|
|
reportmirror_mirrors: [epel, fedora]
|
|
reportmirror_sitename: foo.sh
|
|
reportmirror_password: "{{ report_mirror_pass }}"
|
|
- role: mirror/sync
|
|
mirror_label: fedora-epel
|
|
mirror_source:
|
|
"rsync://rsync.nic.funet.fi/ftp/pub/mirrors/fedora.redhat.com/pub/epel"
|
|
mirror_rsyncoptions:
|
|
- "--exclude=debug"
|
|
- "--exclude=testing"
|
|
- "--exclude=aarch64"
|
|
- "--exclude=ppc64le"
|
|
- "--exclude=s390x"
|
|
- "--exclude=source"
|
|
- "--delete-excluded"
|
|
mirror_postcmd: python3 /usr/local/bin/report_mirror
|
|
- role: mirror/sync
|
|
mirror_label: fedora
|
|
mirror_source:
|
|
"rsync://rsync.nic.funet.fi/ftp/pub/mirrors/fedora.redhat.com/pub/fedora/linux/"
|
|
mirror_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"
|
|
mirror_postcmd: python3 /usr/local/bin/report_mirror
|
|
- role: mirror/sync
|
|
mirror_label: openbsd
|
|
mirror_source: "rsync://ftp.nluug.nl/openbsd/"
|
|
mirror_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
|
|
ansible.builtin.file:
|
|
dest: /srv/web/{{ inventory_hostname }}/foo.sh
|
|
src: /srv/mirrors/foo.sh
|
|
state: link
|
|
owner: root
|
|
group: "{{ ansible_wheel }}"
|
|
follow: false
|