--- - name: mirror fedora main repo hosts: all become: true gather_facts: true vars: repoid: "Fedora" work_path: "/web/repos/Fedora/{{ version }}/{{ repoid }}/os" src_url: "https://ftp.halifax.rwth-aachen.de/fedora/linux/releases/{{ version }}/Everything/x86_64/os/" tasks: - name: create directory ansible.builtin.file: path: "{{ work_path }}" state: "directory" - name: mirror repo shell: "dnf reposync --remote-time --newest-only --delete --download-metadata --norepopath -p {{ work_path }} --repofrompath=x,{{ src_url }} --repoid=x"