This commit is contained in:
David Rotermund 2024-04-19 15:52:13 +02:00
parent 52d4241596
commit 74ccc9c832
24 changed files with 204 additions and 143 deletions

46
base_update.yaml Normal file
View file

@ -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

View file

@ -1,4 +0,0 @@
---
version: "37"
base_path: "/web/repos/Fedora"

View file

@ -5,6 +5,22 @@
tasks: 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 - name: Make sure systemd-oomd service unit is stopped
systemd_service: systemd_service:
state: stopped state: stopped
@ -15,32 +31,21 @@
- name: update file myrepo.repo - name: update file myrepo.repo
import_tasks: yaml_sub/myrepo_data.yaml import_tasks: yaml_sub/myrepo_data.yaml
- name: update system (base) - name: update system
dnf: dnf:
name: "*" name: "google-chrome-stable,microsoft-edge-stable,code,zoom,microsoft-edge-stable,thunderbird,firefox"
state: latest state: latest
update_cache: true update_cache: true
skip_broken: true skip_broken: true
nobest: false nobest: false
allowerasing: true 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 - name: Make sure systemd-oomd service unit is started
systemd_service: systemd_service:
state: started state: started
name: systemd-oomd name: systemd-oomd
- name: stop shutdown embargo
ansible.builtin.file:
path: /etc/polkit-1/rules.d/55-inhibit-shutdown.rules
state: "absent"

22
mirror_repos/chrome.yaml Normal file
View file

@ -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"

View file

@ -1,6 +1,6 @@
--- ---
- name: mirror cuda 35 repo - name: mirror cuda 35 repo
hosts: all hosts: repo.neuro.uni-bremen.de
become: true become: true
gather_facts: true gather_facts: true
@ -17,7 +17,7 @@
state: "directory" state: "directory"
- name: mirror repo - 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"

View file

@ -17,7 +17,7 @@
state: "directory" state: "directory"
- name: mirror repo - 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"

View file

@ -17,7 +17,7 @@
state: "directory" state: "directory"
- name: mirror repo - 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"

View file

@ -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"

View file

@ -16,7 +16,7 @@
state: "directory" state: "directory"
- name: mirror repo - 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"

View file

@ -16,7 +16,7 @@
state: "directory" state: "directory"
- name: mirror repo - 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"

View file

@ -5,21 +5,17 @@
gather_facts: true gather_facts: true
vars: vars:
work_path: "Fedora" repoid: "Fedora"
src_url: "rsync://ftp.halifax.rwth-aachen.de/fedora/linux/releases/{{ version }}/Everything/x86_64/" work_path: "/web/repos/Fedora/{{ version }}/{{ repoid }}"
src_url: "https://ftp.halifax.rwth-aachen.de/fedora/linux/releases/{{ version }}/Everything/x86_64/"
tasks: tasks:
- name: create directory - name: create directory
ansible.builtin.file: ansible.builtin.file:
path: "{{ base_path }}/{{ version }}/{{ work_path }}" path: "{{ work_path }}"
state: "directory" state: "directory"
- name: syncronize - name: mirror repo
ansible.posix.synchronize: shell: "dnf reposync --remote-time --newest-only --delete --download-metadata --norepopath -p {{ work_path }} --repofrompath=x,{{ src_url }} --repoid=x"
dest: "{{ base_path }}/{{ version }}/{{ work_path }}"
src: "{{ src_url }}"
delete: "true"
delegate_to: "{{ inventory_hostname }}"

View file

@ -5,21 +5,20 @@
gather_facts: true gather_facts: true
vars: vars:
work_path: "Fedora_Update" repoid: "Fedora_Update"
src_url: "rsync://ftp.halifax.rwth-aachen.de/fedora/linux/updates/{{ version }}/Everything/x86_64/" work_path: "/web/repos/Fedora/{{ version }}/{{ repoid }}"
src_url: "https://ftp.halifax.rwth-aachen.de/fedora/linux/updates/{{ version }}/Everything/x86_64/"
tasks: tasks:
- name: create directory - name: create directory
ansible.builtin.file: ansible.builtin.file:
path: "{{ base_path }}/{{ version }}/{{ work_path }}" path: "{{ work_path }}"
state: "directory" state: "directory"
- name: syncronize - name: mirror repo
ansible.posix.synchronize: shell: "dnf reposync --remote-time --newest-only --delete --download-metadata --norepopath -p {{ work_path }} --repofrompath=x,{{ src_url }} --repoid=x"
dest: "{{ base_path }}/{{ version }}/{{ work_path }}"
src: "{{ src_url }}"
delete: "true"
delegate_to: "{{ inventory_hostname }}"

View file

@ -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 }}"

View file

@ -5,21 +5,19 @@
gather_facts: true gather_facts: true
vars: vars:
work_path: "Fedora_Modular_Update" repoid: "Fedora_Modular_Update"
src_url: "rsync://ftp.halifax.rwth-aachen.de/fedora/linux/updates/{{ version }}/Modular/x86_64/" work_path: "/web/repos/Fedora/{{ version }}/{{ repoid }}"
src_url: "https://ftp.halifax.rwth-aachen.de/fedora/linux/updates/{{ version }}/Modular/x86_64/"
tasks: tasks:
- name: create directory - name: create directory
ansible.builtin.file: ansible.builtin.file:
path: "{{ base_path }}/{{ version }}/{{ work_path }}" path: "{{ work_path }}"
state: "directory" state: "directory"
- name: syncronize - name: mirror repo
ansible.posix.synchronize: shell: "dnf reposync --remote-time --newest-only --delete --download-metadata --norepopath -p {{ work_path }} --repofrompath=x,{{ src_url }} --repoid=x"
dest: "{{ base_path }}/{{ version }}/{{ work_path }}"
src: "{{ src_url }}"
delete: "true"
delegate_to: "{{ inventory_hostname }}"

View file

@ -5,21 +5,18 @@
gather_facts: true gather_facts: true
vars: vars:
work_path: "fusion_free" repoid: "fusion_free"
src_url: "rsync://mirror1.hs-esslingen.de/rpmfusion/free/fedora/updates/{{ version }}/x86_64/" 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:
tasks:
- name: create directory - name: create directory
ansible.builtin.file: ansible.builtin.file:
path: "{{ base_path }}/{{ version }}/{{ work_path }}" path: "{{ work_path }}"
state: "directory" state: "directory"
- name: syncronize - name: mirror repo
ansible.posix.synchronize: shell: "dnf reposync --remote-time --newest-only --delete --download-metadata --norepopath -p {{ work_path }} --repofrompath=x,{{ src_url }} --repoid=x"
dest: "{{ base_path }}/{{ version }}/{{ work_path }}"
src: "{{ src_url }}"
delete: "true"
delegate_to: "{{ inventory_hostname }}"

View file

@ -5,21 +5,15 @@
gather_facts: true gather_facts: true
vars: vars:
work_path: "fusion_free2" repoid: "fusion_free2"
src_url: "rsync://mirror1.hs-esslingen.de/rpmfusion/free/fedora/releases/{{ version }}/Everything/x86_64/" 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: tasks:
- name: create directory - name: create directory
ansible.builtin.file: ansible.builtin.file:
path: "{{ base_path }}/{{ version }}/{{ work_path }}" path: "{{ work_path }}"
state: "directory" state: "directory"
- name: syncronize - name: mirror repo
ansible.posix.synchronize: shell: "dnf reposync --remote-time --newest-only --delete --download-metadata --norepopath -p {{ work_path }} --repofrompath=x,{{ src_url }} --repoid=x"
dest: "{{ base_path }}/{{ version }}/{{ work_path }}"
src: "{{ src_url }}"
delete: "true"
delegate_to: "{{ inventory_hostname }}"

View file

@ -5,21 +5,17 @@
gather_facts: true gather_facts: true
vars: vars:
work_path: "fusion_nonfree" repoid: "fusion_nonfree"
src_url: "rsync://mirror1.hs-esslingen.de/rpmfusion/nonfree/fedora/updates/{{ version }}/x86_64/" 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:
tasks:
- name: create directory - name: create directory
ansible.builtin.file: ansible.builtin.file:
path: "{{ base_path }}/{{ version }}/{{ work_path }}" path: "{{ work_path }}"
state: "directory" state: "directory"
- name: syncronize - name: mirror repo
ansible.posix.synchronize: shell: "dnf reposync --remote-time --newest-only --delete --download-metadata --norepopath -p {{ work_path }} --repofrompath=x,{{ src_url }} --repoid=x"
dest: "{{ base_path }}/{{ version }}/{{ work_path }}"
src: "{{ src_url }}"
delete: "true"
delegate_to: "{{ inventory_hostname }}"

View file

@ -5,20 +5,15 @@
gather_facts: true gather_facts: true
vars: vars:
work_path: "fusion_nonfree2" repoid: "fusion_nonfree2"
src_url: "rsync://mirror1.hs-esslingen.de/rpmfusion/nonfree/fedora/releases/{{ version }}/Everything/x86_64/" 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: tasks:
- name: create directory - name: create directory
ansible.builtin.file: ansible.builtin.file:
path: "{{ base_path }}/{{ version }}/{{ work_path }}" path: "{{ work_path }}"
state: "directory" state: "directory"
- name: syncronize - name: mirror repo
ansible.posix.synchronize: shell: "dnf reposync --remote-time --newest-only --delete --download-metadata --norepopath -p {{ work_path }} --repofrompath=x,{{ src_url }} --repoid=x"
dest: "{{ base_path }}/{{ version }}/{{ work_path }}"
src: "{{ src_url }}"
delete: "true"
delegate_to: "{{ inventory_hostname }}"

View file

@ -5,20 +5,20 @@
gather_facts: true gather_facts: true
vars: vars:
work_path: "fusion_nonfree_nvidia" repoid: "fusion_nonfree_nvidia"
src_url: "rsync://mirror1.hs-esslingen.de/rpmfusion/nonfree/fedora/nvidia-driver/{{ version }}/x86_64/" 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: tasks:
- name: create directory - name: create directory
ansible.builtin.file: ansible.builtin.file:
path: "{{ base_path }}/{{ version }}/{{ work_path }}" path: "{{ work_path }}"
state: "directory" state: "directory"
- name: syncronize - name: mirror repo
ansible.posix.synchronize: shell: "dnf reposync --remote-time --newest-only --delete --download-metadata --norepopath -p {{ work_path }} --repofrompath=x,{{ src_url }} --repoid=x"
dest: "{{ base_path }}/{{ version }}/{{ work_path }}"
src: "{{ src_url }}"
delete: "true"
delegate_to: "{{ inventory_hostname }}"

View file

@ -16,7 +16,7 @@
state: "directory" state: "directory"
- name: mirror repo - 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"

View file

@ -16,7 +16,7 @@
state: "directory" state: "directory"
- name: mirror repo - 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"

View file

@ -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

22
mirror_repos/vivaldi.yaml Normal file
View file

@ -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"

View file

@ -16,7 +16,7 @@
state: "directory" state: "directory"
- name: mirror repo - 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"