diff --git a/base_update.yaml b/base_update.yaml new file mode 100644 index 0000000..bc68e9c --- /dev/null +++ b/base_update.yaml @@ -0,0 +1,46 @@ +--- +- name: install our repos + hosts: all + become: true + + tasks: + + - name: Make sure systemd-oomd service unit is stopped + systemd_service: + state: stopped + name: systemd-oomd + + - name: remove other files + include_tasks: yaml_sub/myrepo_clean.yaml + - name: update file myrepo.repo + import_tasks: yaml_sub/myrepo_data.yaml + + - name: update system (base) + dnf: + name: "*" + state: latest + update_cache: true + skip_broken: true + nobest: false + allowerasing: true + + - name: remove other files + include_tasks: yaml_sub/myrepo_clean.yaml + - name: update file myrepo.repo + import_tasks: yaml_sub/myrepo_data.yaml + + - name: update system (all repo) + dnf: + name: "*" + state: latest + update_cache: true + skip_broken: true + nobest: false + allowerasing: true + enablerepo: "*" + + - name: Make sure systemd-oomd service unit is started + systemd_service: + state: started + name: systemd-oomd + diff --git a/config/fedora_37.yaml b/config/fedora_37.yaml deleted file mode 100644 index 03ec1f5..0000000 --- a/config/fedora_37.yaml +++ /dev/null @@ -1,4 +0,0 @@ ---- - version: "37" - base_path: "/web/repos/Fedora" - \ No newline at end of file diff --git a/hourly_update.yaml b/hourly_update.yaml index bc68e9c..7396fec 100644 --- a/hourly_update.yaml +++ b/hourly_update.yaml @@ -5,6 +5,22 @@ tasks: + - name: block shutdown + blockinfile: + path: /etc/polkit-1/rules.d/55-inhibit-shutdown.rules + state: present + create: true + owner: "root" + group: "root" + mode: "0666" + block: | + polkit.addRule(function(action, subject) { + if (action.id.indexOf("org.freedesktop.login1.power-off") == 0 || + action.id.indexOf("org.freedesktop.login1.reboot") == 0) { + return polkit.Result.AUTH_ADMIN; + } + }); + - name: Make sure systemd-oomd service unit is stopped systemd_service: state: stopped @@ -15,32 +31,21 @@ - name: update file myrepo.repo import_tasks: yaml_sub/myrepo_data.yaml - - name: update system (base) + - name: update system dnf: - name: "*" + name: "google-chrome-stable,microsoft-edge-stable,code,zoom,microsoft-edge-stable,thunderbird,firefox" state: latest update_cache: true skip_broken: true nobest: false allowerasing: true - - name: remove other files - include_tasks: yaml_sub/myrepo_clean.yaml - - name: update file myrepo.repo - import_tasks: yaml_sub/myrepo_data.yaml - - - name: update system (all repo) - dnf: - name: "*" - state: latest - update_cache: true - skip_broken: true - nobest: false - allowerasing: true - enablerepo: "*" - - name: Make sure systemd-oomd service unit is started systemd_service: state: started name: systemd-oomd + - name: stop shutdown embargo + ansible.builtin.file: + path: /etc/polkit-1/rules.d/55-inhibit-shutdown.rules + state: "absent" \ No newline at end of file diff --git a/mirror_repos/chrome.yaml b/mirror_repos/chrome.yaml new file mode 100644 index 0000000..122dd52 --- /dev/null +++ b/mirror_repos/chrome.yaml @@ -0,0 +1,22 @@ +--- +- name: mirror edge repo + hosts: all + become: true + gather_facts: true + + vars: + repoid: "google_64" + work_path: "/web/repos/Fedora/AllVersion/{{ repoid }}" + src_url: "http://dl.google.com/linux/chrome/rpm/stable/x86_64/" + + 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" + + + diff --git a/mirror_repos/cuda_35.yaml b/mirror_repos/cuda_35.yaml index 98525b4..31f9482 100644 --- a/mirror_repos/cuda_35.yaml +++ b/mirror_repos/cuda_35.yaml @@ -1,6 +1,6 @@ --- - name: mirror cuda 35 repo - hosts: all + hosts: repo.neuro.uni-bremen.de become: true gather_facts: true @@ -17,7 +17,7 @@ state: "directory" - name: mirror repo - shell: "dnf reposync -a x86_64 --delete --download-metadata --norepopath -p {{ work_path }} --repofrompath=x,{{ src_url }} --repoid=x" + shell: "dnf reposync --remote-time --newest-only --delete --download-metadata --norepopath -p {{ work_path }} --repofrompath=x,{{ src_url }} --repoid=x" diff --git a/mirror_repos/cuda_36.yaml b/mirror_repos/cuda_36.yaml index 031fb61..e2df6a5 100644 --- a/mirror_repos/cuda_36.yaml +++ b/mirror_repos/cuda_36.yaml @@ -17,7 +17,7 @@ state: "directory" - name: mirror repo - shell: "dnf reposync -a x86_64 --delete --download-metadata --norepopath -p {{ work_path }} --repofrompath=x,{{ src_url }} --repoid=x" + shell: "dnf reposync --remote-time --newest-only --delete --download-metadata --norepopath -p {{ work_path }} --repofrompath=x,{{ src_url }} --repoid=x" diff --git a/mirror_repos/cuda_37.yaml b/mirror_repos/cuda_37.yaml index bea708e..453b5a3 100644 --- a/mirror_repos/cuda_37.yaml +++ b/mirror_repos/cuda_37.yaml @@ -17,7 +17,7 @@ state: "directory" - name: mirror repo - shell: "dnf reposync -a x86_64 --delete --download-metadata --norepopath -p {{ work_path }} --repofrompath=x,{{ src_url }} --repoid=x" + shell: "dnf reposync --remote-time --newest-only --delete --download-metadata --norepopath -p {{ work_path }} --repofrompath=x,{{ src_url }} --repoid=x" diff --git a/mirror_repos/cuda_rhel8.yaml b/mirror_repos/cuda_rhel8.yaml new file mode 100644 index 0000000..b442b7d --- /dev/null +++ b/mirror_repos/cuda_rhel8.yaml @@ -0,0 +1,23 @@ +--- +- name: mirror cuda rhel 8 repo + hosts: all + become: true + gather_facts: true + + vars: + repoid: "cuda_rhel8" + work_path: "/web/repos/Fedora/AllVersion/{{ repoid }}" + src_url: "https://developer.download.nvidia.com/compute/machine-learning/repos/rhel8/x86_64/" + + 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" + + + diff --git a/mirror_repos/docker.yaml b/mirror_repos/docker.yaml index d769fd6..aead42d 100644 --- a/mirror_repos/docker.yaml +++ b/mirror_repos/docker.yaml @@ -16,7 +16,7 @@ state: "directory" - name: mirror repo - shell: "dnf reposync -a x86_64 --delete --download-metadata --norepopath -p {{ work_path }} --repofrompath=x,{{ src_url }} --repoid=x" + shell: "dnf reposync --remote-time --newest-only --delete --download-metadata --norepopath -p {{ work_path }} --repofrompath=x,{{ src_url }} --repoid=x" diff --git a/mirror_repos/edge.yaml b/mirror_repos/edge.yaml index 8ecbbd4..b3f188a 100644 --- a/mirror_repos/edge.yaml +++ b/mirror_repos/edge.yaml @@ -16,7 +16,7 @@ state: "directory" - name: mirror repo - shell: "dnf reposync -a x86_64 --delete --download-metadata --norepopath -p {{ work_path }} --repofrompath=x,{{ src_url }} --repoid=x" + shell: "dnf reposync --remote-time --newest-only --delete --download-metadata --norepopath -p {{ work_path }} --repofrompath=x,{{ src_url }} --repoid=x" diff --git a/mirror_repos/fedora_main.yaml b/mirror_repos/fedora_main.yaml index ae1416b..3c25312 100644 --- a/mirror_repos/fedora_main.yaml +++ b/mirror_repos/fedora_main.yaml @@ -5,21 +5,17 @@ gather_facts: true vars: - work_path: "Fedora" - src_url: "rsync://ftp.halifax.rwth-aachen.de/fedora/linux/releases/{{ version }}/Everything/x86_64/" + repoid: "Fedora" + work_path: "/web/repos/Fedora/{{ version }}/{{ repoid }}" + src_url: "https://ftp.halifax.rwth-aachen.de/fedora/linux/releases/{{ version }}/Everything/x86_64/" tasks: - - name: create directory ansible.builtin.file: - path: "{{ base_path }}/{{ version }}/{{ work_path }}" + path: "{{ work_path }}" state: "directory" - - name: syncronize - ansible.posix.synchronize: - dest: "{{ base_path }}/{{ version }}/{{ work_path }}" - src: "{{ src_url }}" - delete: "true" - delegate_to: "{{ inventory_hostname }}" + - name: mirror repo + shell: "dnf reposync --remote-time --newest-only --delete --download-metadata --norepopath -p {{ work_path }} --repofrompath=x,{{ src_url }} --repoid=x" diff --git a/mirror_repos/fedora_main_update.yaml b/mirror_repos/fedora_main_update.yaml index d931865..e306ae8 100644 --- a/mirror_repos/fedora_main_update.yaml +++ b/mirror_repos/fedora_main_update.yaml @@ -5,21 +5,20 @@ gather_facts: true vars: - work_path: "Fedora_Update" - src_url: "rsync://ftp.halifax.rwth-aachen.de/fedora/linux/updates/{{ version }}/Everything/x86_64/" + repoid: "Fedora_Update" + work_path: "/web/repos/Fedora/{{ version }}/{{ repoid }}" + src_url: "https://ftp.halifax.rwth-aachen.de/fedora/linux/updates/{{ version }}/Everything/x86_64/" tasks: - - name: create directory ansible.builtin.file: - path: "{{ base_path }}/{{ version }}/{{ work_path }}" + path: "{{ work_path }}" state: "directory" - - name: syncronize - ansible.posix.synchronize: - dest: "{{ base_path }}/{{ version }}/{{ work_path }}" - src: "{{ src_url }}" - delete: "true" - delegate_to: "{{ inventory_hostname }}" + - name: mirror repo + shell: "dnf reposync --remote-time --newest-only --delete --download-metadata --norepopath -p {{ work_path }} --repofrompath=x,{{ src_url }} --repoid=x" + + + diff --git a/mirror_repos/fedora_modular.yaml b/mirror_repos/fedora_modular.yaml deleted file mode 100644 index 8767e05..0000000 --- a/mirror_repos/fedora_modular.yaml +++ /dev/null @@ -1,25 +0,0 @@ ---- -- name: mirror fedora modular repo - hosts: all - become: true - gather_facts: true - - vars: - work_path: "Fedora_Modular" - src_url: "rsync://ftp.halifax.rwth-aachen.de/fedora/linux/releases/{{ version }}/Modular/x86_64/" - - tasks: - - - name: create directory - ansible.builtin.file: - path: "{{ base_path }}/{{ version }}/{{ work_path }}" - state: "directory" - - - name: syncronize - ansible.posix.synchronize: - dest: "{{ base_path }}/{{ version }}/{{ work_path }}" - src: "{{ src_url }}" - delete: "true" - delegate_to: "{{ inventory_hostname }}" - - diff --git a/mirror_repos/fedora_modular_update.yaml b/mirror_repos/fedora_modular_update.yaml index dfb9a10..f76af3d 100644 --- a/mirror_repos/fedora_modular_update.yaml +++ b/mirror_repos/fedora_modular_update.yaml @@ -5,21 +5,19 @@ gather_facts: true vars: - work_path: "Fedora_Modular_Update" - src_url: "rsync://ftp.halifax.rwth-aachen.de/fedora/linux/updates/{{ version }}/Modular/x86_64/" + repoid: "Fedora_Modular_Update" + work_path: "/web/repos/Fedora/{{ version }}/{{ repoid }}" + src_url: "https://ftp.halifax.rwth-aachen.de/fedora/linux/updates/{{ version }}/Modular/x86_64/" tasks: - - name: create directory ansible.builtin.file: - path: "{{ base_path }}/{{ version }}/{{ work_path }}" + path: "{{ work_path }}" state: "directory" - - name: syncronize - ansible.posix.synchronize: - dest: "{{ base_path }}/{{ version }}/{{ work_path }}" - src: "{{ src_url }}" - delete: "true" - delegate_to: "{{ inventory_hostname }}" + - name: mirror repo + shell: "dnf reposync --remote-time --newest-only --delete --download-metadata --norepopath -p {{ work_path }} --repofrompath=x,{{ src_url }} --repoid=x" + + diff --git a/mirror_repos/fusion_free.yaml b/mirror_repos/fusion_free.yaml index 3abd55d..e1c29d8 100644 --- a/mirror_repos/fusion_free.yaml +++ b/mirror_repos/fusion_free.yaml @@ -5,21 +5,18 @@ gather_facts: true vars: - work_path: "fusion_free" - src_url: "rsync://mirror1.hs-esslingen.de/rpmfusion/free/fedora/updates/{{ version }}/x86_64/" - - tasks: + repoid: "fusion_free" + work_path: "/web/repos/Fedora/{{ version }}/{{ repoid }}" + src_url: "http://ftp-stud.hs-esslingen.de/pub/Mirrors/rpmfusion.org/free/fedora/updates/{{ version }}/x86_64/" + tasks: - name: create directory ansible.builtin.file: - path: "{{ base_path }}/{{ version }}/{{ work_path }}" + path: "{{ work_path }}" state: "directory" - - name: syncronize - ansible.posix.synchronize: - dest: "{{ base_path }}/{{ version }}/{{ work_path }}" - src: "{{ src_url }}" - delete: "true" - delegate_to: "{{ inventory_hostname }}" + - name: mirror repo + shell: "dnf reposync --remote-time --newest-only --delete --download-metadata --norepopath -p {{ work_path }} --repofrompath=x,{{ src_url }} --repoid=x" + diff --git a/mirror_repos/fusion_free_everything.yaml b/mirror_repos/fusion_free_everything.yaml index 8f1553b..6b7826c 100644 --- a/mirror_repos/fusion_free_everything.yaml +++ b/mirror_repos/fusion_free_everything.yaml @@ -5,21 +5,15 @@ gather_facts: true vars: - work_path: "fusion_free2" - src_url: "rsync://mirror1.hs-esslingen.de/rpmfusion/free/fedora/releases/{{ version }}/Everything/x86_64/" + repoid: "fusion_free2" + work_path: "/web/repos/Fedora/{{ version }}/{{ repoid }}" + src_url: "http://ftp-stud.hs-esslingen.de/pub/Mirrors/rpmfusion.org/free/fedora/releases/{{ version }}/Everything/x86_64/" tasks: - - name: create directory ansible.builtin.file: - path: "{{ base_path }}/{{ version }}/{{ work_path }}" + path: "{{ work_path }}" state: "directory" - - name: syncronize - ansible.posix.synchronize: - dest: "{{ base_path }}/{{ version }}/{{ work_path }}" - src: "{{ src_url }}" - delete: "true" - delegate_to: "{{ inventory_hostname }}" - - + - name: mirror repo + shell: "dnf reposync --remote-time --newest-only --delete --download-metadata --norepopath -p {{ work_path }} --repofrompath=x,{{ src_url }} --repoid=x" diff --git a/mirror_repos/fusion_nonfree.yaml b/mirror_repos/fusion_nonfree.yaml index 22ffd6e..44eba2d 100644 --- a/mirror_repos/fusion_nonfree.yaml +++ b/mirror_repos/fusion_nonfree.yaml @@ -5,21 +5,17 @@ gather_facts: true vars: - work_path: "fusion_nonfree" - src_url: "rsync://mirror1.hs-esslingen.de/rpmfusion/nonfree/fedora/updates/{{ version }}/x86_64/" - - tasks: + repoid: "fusion_nonfree" + work_path: "/web/repos/Fedora/{{ version }}/{{ repoid }}" + src_url: "http://ftp-stud.hs-esslingen.de/pub/Mirrors/rpmfusion.org/nonfree/fedora/updates/{{ version }}/x86_64/" + tasks: - name: create directory ansible.builtin.file: - path: "{{ base_path }}/{{ version }}/{{ work_path }}" + path: "{{ work_path }}" state: "directory" - - name: syncronize - ansible.posix.synchronize: - dest: "{{ base_path }}/{{ version }}/{{ work_path }}" - src: "{{ src_url }}" - delete: "true" - delegate_to: "{{ inventory_hostname }}" + - name: mirror repo + shell: "dnf reposync --remote-time --newest-only --delete --download-metadata --norepopath -p {{ work_path }} --repofrompath=x,{{ src_url }} --repoid=x" diff --git a/mirror_repos/fusion_nonfree_everything.yaml b/mirror_repos/fusion_nonfree_everything.yaml index d3f7505..5cf16ad 100644 --- a/mirror_repos/fusion_nonfree_everything.yaml +++ b/mirror_repos/fusion_nonfree_everything.yaml @@ -5,20 +5,15 @@ gather_facts: true vars: - work_path: "fusion_nonfree2" - src_url: "rsync://mirror1.hs-esslingen.de/rpmfusion/nonfree/fedora/releases/{{ version }}/Everything/x86_64/" - + repoid: "fusion_nonfree2" + work_path: "/web/repos/Fedora/{{ version }}/{{ repoid }}" + src_url: "http://ftp-stud.hs-esslingen.de/pub/Mirrors/rpmfusion.org/nonfree/fedora/releases/{{ version }}/Everything/x86_64/" + tasks: - name: create directory ansible.builtin.file: - path: "{{ base_path }}/{{ version }}/{{ work_path }}" + path: "{{ work_path }}" state: "directory" - - name: syncronize - ansible.posix.synchronize: - dest: "{{ base_path }}/{{ version }}/{{ work_path }}" - src: "{{ src_url }}" - delete: "true" - delegate_to: "{{ inventory_hostname }}" - - + - name: mirror repo + shell: "dnf reposync --remote-time --newest-only --delete --download-metadata --norepopath -p {{ work_path }} --repofrompath=x,{{ src_url }} --repoid=x" diff --git a/mirror_repos/fusion_nonfree_nvidia.yaml b/mirror_repos/fusion_nonfree_nvidia.yaml index 8d50249..b258889 100644 --- a/mirror_repos/fusion_nonfree_nvidia.yaml +++ b/mirror_repos/fusion_nonfree_nvidia.yaml @@ -5,20 +5,20 @@ gather_facts: true vars: - work_path: "fusion_nonfree_nvidia" - src_url: "rsync://mirror1.hs-esslingen.de/rpmfusion/nonfree/fedora/nvidia-driver/{{ version }}/x86_64/" + repoid: "fusion_nonfree_nvidia" + work_path: "/web/repos/Fedora/{{ version }}/{{ repoid }}" + src_url: "http://ftp-stud.hs-esslingen.de/pub/Mirrors/rpmfusion.org/nonfree/fedora/nvidia-driver/{{ version }}/x86_64/" tasks: - name: create directory ansible.builtin.file: - path: "{{ base_path }}/{{ version }}/{{ work_path }}" + path: "{{ work_path }}" state: "directory" - - name: syncronize - ansible.posix.synchronize: - dest: "{{ base_path }}/{{ version }}/{{ work_path }}" - src: "{{ src_url }}" - delete: "true" - delegate_to: "{{ inventory_hostname }}" + - name: mirror repo + shell: "dnf reposync --remote-time --newest-only --delete --download-metadata --norepopath -p {{ work_path }} --repofrompath=x,{{ src_url }} --repoid=x" + + + diff --git a/mirror_repos/oneAPI.yaml b/mirror_repos/oneAPI.yaml index 2bca4e3..3f28d31 100644 --- a/mirror_repos/oneAPI.yaml +++ b/mirror_repos/oneAPI.yaml @@ -16,7 +16,7 @@ state: "directory" - name: mirror repo - shell: "dnf reposync -a x86_64 --delete --download-metadata --norepopath -p {{ work_path }} --repofrompath=x,{{ src_url }} --repoid=x" + shell: "dnf reposync --remote-time --newest-only --delete --download-metadata --norepopath -p {{ work_path }} --repofrompath=x,{{ src_url }} --repoid=x" diff --git a/mirror_repos/opera.yaml b/mirror_repos/opera.yaml index f56cf03..958b0b6 100644 --- a/mirror_repos/opera.yaml +++ b/mirror_repos/opera.yaml @@ -16,7 +16,7 @@ state: "directory" - name: mirror repo - shell: "dnf reposync -a x86_64 --delete --download-metadata --norepopath -p {{ work_path }} --repofrompath=x,{{ src_url }} --repoid=x" + shell: "dnf reposync --remote-time --newest-only --delete --download-metadata --norepopath -p {{ work_path }} --repofrompath=x,{{ src_url }} --repoid=x" diff --git a/mirror_repos/todo.txt b/mirror_repos/todo.txt deleted file mode 100644 index edc1a82..0000000 --- a/mirror_repos/todo.txt +++ /dev/null @@ -1,3 +0,0 @@ -# Broken -dnf reposync -a x86_64 --delete --download-metadata --norepopath -p /web/repos/Fedora/AllVersion/google_64 --repofrompath=google_64,http://dl.google.com/linux/chrome/rpm/stable/ --repoid=google_64 - \ No newline at end of file diff --git a/mirror_repos/vivaldi.yaml b/mirror_repos/vivaldi.yaml new file mode 100644 index 0000000..2b5ac11 --- /dev/null +++ b/mirror_repos/vivaldi.yaml @@ -0,0 +1,22 @@ +--- +- name: mirror vivaldi repo + hosts: all + become: true + gather_facts: true + + vars: + repoid: "vivaldi" + work_path: "/web/repos/Fedora/AllVersion/{{ repoid }}" + src_url: "https://repo.vivaldi.com/stable/rpm/x86_64/" + + 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" + + + diff --git a/mirror_repos/vscode.yaml b/mirror_repos/vscode.yaml index ac841b1..fff993f 100644 --- a/mirror_repos/vscode.yaml +++ b/mirror_repos/vscode.yaml @@ -16,7 +16,7 @@ state: "directory" - name: mirror repo - shell: "dnf reposync -a x86_64 --delete --download-metadata --norepopath -p {{ work_path }} --repofrompath=x,{{ src_url }} --repoid=x" + shell: "dnf reposync --remote-time --newest-only --delete --download-metadata --norepopath -p {{ work_path }} --repofrompath=x,{{ src_url }} --repoid=x"