Files
fedora-infra_ansible/playbooks/groups/download.yml
Kevin Fenzi 9717d920af anubis: rename anubis-el8 to anubis-el and see about enabling on download
Looks like the scrapers are hitting the download servers now.
So, look at setting up an anubis pod there like we did for pagure.
anubis package isn't available for epel9, so we just use the container.

Will test this with dl01 and tweak until it's working.

Signed-off-by: Kevin Fenzi <kevin@scrye.com>
2026-01-22 08:50:34 -08:00

95 lines
4.1 KiB
YAML

---
- import_playbook: "/srv/web/infra/ansible/playbooks/include/virt-create.yml"
vars:
myhosts: "download_ibiblio:download_iso_rdu3:download_rdu3"
- name: Download servers
hosts: download
user: root
gather_facts: false
vars_files:
- /srv/web/infra/ansible/vars/global.yml
- "/srv/private/ansible/vars.yml"
- /srv/web/infra/ansible/vars/{{ ansible_distribution }}.yml
tasks:
handlers:
- import_tasks: "{{ handlers_path }}/restart_services.yml"
- name: Post-initial-steps
hosts: download
user: root
gather_facts: true
vars_files:
- /srv/web/infra/ansible/vars/global.yml
- "/srv/private/ansible/vars.yml"
- "/srv/web/infra/ansible/vars/{{ ansible_distribution }}.yml"
roles:
- base
- rkhunter
- nagios_client
- hosts
- { role: openvpn/client, when: vpn == True }
- zabbix/zabbix_agent
- ipa/client
- collectd/base
- apache
- download
- role: anubis-el
tags:
- anubis
- rsyncd
- { role: nfs/client, when: "'download_rdu3' in group_names" , mnt_dir: '/srv/pub', nfs_src_dir: 'fedora_ftp/fedora.redhat.com/pub' }
- { role: nfs/client, when: "'download_rdu3' in group_names" , mnt_dir: '/srv/pub/archive', nfs_src_dir: 'fedora_ftp_archive' }
- { role: nfs/client, when: "'download_rdu3' in group_names" , mnt_dir: '/mnt/fedora_koji', nfs_src_dir: 'fedora_koji' } # needed for internal sync
- sudo
pre_tasks:
- include_vars: dir=/srv/web/infra/ansible/vars/all/ ignore_files=README
- import_tasks: "{{ tasks_path }}/yumrepos.yml"
tasks:
- name: put in script for syncing fedora on download-ib01
ansible.builtin.copy: src="{{ files }}/download/sync-up-downloads.sh.ib01" dest=/usr/local/bin/sync-up-downloads owner=root group=root mode=755
when: inventory_hostname == 'download-ib01.fedoraproject.org'
- name: Put in script for syncing fedora-alt on download-ib01
ansible.builtin.copy: src="{{ files }}/download/sync-up-other.sh.ib01" dest=/usr/local/bin/sync-up-other owner=root group=root mode=755
when: inventory_hostname == 'download-ib01.fedoraproject.org'
- name: Put in script for syncing centos on download-ib01
ansible.builtin.copy: src="{{ files }}/download/sync-up-centos.sh.ib01" dest=/usr/local/bin/sync-up-centos owner=root group=root mode=755
when: inventory_hostname == 'download-ib01.fedoraproject.org'
- name: Put in cron job for syncing
ansible.builtin.copy: src="{{ files }}/download/download-sync.cron.ib01" dest=/etc/cron.d/download-sync owner=root group=root mode=644
when: inventory_hostname == 'download-ib01.fedoraproject.org'
- name: Put in last sync scrypt for download-ib01
ansible.builtin.copy: src="{{ files}}/download/last-sync" dest=/usr/local/bin/last-sync mode=0755
when: inventory_hostname == 'download-ib01.fedoraproject.org'
- name: Install bc so last-sync works.
ansible.builtin.package: name=bc state=present
when: inventory_hostname == 'download-ib01.fedoraproject.org'
- name: Put in script for syncing on download-iso01
ansible.builtin.copy: src="{{ files }}/download/sync-up-downloads.sh.iso01" dest=/usr/local/bin/sync-up-downloads owner=root group=root mode=755
when: inventory_hostname == 'download-iso01.rdu3.fedoraproject.org'
- name: Put in script for syncing centos on download-iso01
ansible.builtin.copy: src="{{ files }}/download/sync-up-centos.sh.iso01" dest=/usr/local/bin/sync-up-centos owner=root group=root mode=755
when: inventory_hostname == 'download-iso01.rdu3.fedoraproject.org'
- name: Put in cron job for syncing on download-iso01
ansible.builtin.copy: src="{{ files }}/download/download-sync.cron.iso01" dest=/etc/cron.d/download-sync owner=root group=root mode=644
when: inventory_hostname == 'download-iso01.rdu3.fedoraproject.org'
- name: Put in last sync scrypt for download-iso01
ansible.builtin.copy: src="{{ files}}/download/last-sync" dest=/usr/local/bin/last-sync mode=0755
when: inventory_hostname == 'download-iso01.rdu3.fedoraproject.org'
- name: Make a mnt/koji link
ansible.builtin.file: state=link src=/mnt/fedora_koji/koji dest=/mnt/koji
when: "'download_rdu3' in group_names"
handlers:
- import_tasks: "{{ handlers_path }}/restart_services.yml"