2024-04-19 01:34:53 +02:00
|
|
|
---
|
|
|
|
- name: mirror fedora main repo
|
|
|
|
hosts: all
|
|
|
|
become: true
|
|
|
|
gather_facts: true
|
|
|
|
|
2024-04-24 09:01:32 +02:00
|
|
|
vars:
|
2024-04-19 15:52:13 +02:00
|
|
|
repoid: "Fedora"
|
2024-04-24 09:01:32 +02:00
|
|
|
work_path: "/web/repos/Fedora/{{ version }}/{{ repoid }}/os"
|
|
|
|
src_url: "https://ftp.halifax.rwth-aachen.de/fedora/linux/releases/{{ version }}/Everything/x86_64/os/"
|
2024-04-19 01:34:53 +02:00
|
|
|
|
|
|
|
tasks:
|
|
|
|
- name: create directory
|
|
|
|
ansible.builtin.file:
|
2024-04-19 15:52:13 +02:00
|
|
|
path: "{{ work_path }}"
|
2024-04-19 01:34:53 +02:00
|
|
|
state: "directory"
|
|
|
|
|
2024-04-19 15:52:13 +02:00
|
|
|
- name: mirror repo
|
|
|
|
shell: "dnf reposync --remote-time --newest-only --delete --download-metadata --norepopath -p {{ work_path }} --repofrompath=x,{{ src_url }} --repoid=x"
|