Upgrade Ubuntu 22.04 to 24.04 (Inplace and Reinstall) (#200)
Reviewed-on: https://git.mgrote.net///mg/homeserver/pulls/200 Co-authored-by: Michael Grote <michael.grote@posteo.de> Co-committed-by: Michael Grote <michael.grote@posteo.de>
This commit is contained in:
parent
61a1eba49f
commit
e4b82dd91b
11 changed files with 44 additions and 21 deletions
|
@ -21,8 +21,8 @@ http:
|
||||||
middlewares:
|
middlewares:
|
||||||
ratelimit:
|
ratelimit:
|
||||||
rateLimit:
|
rateLimit:
|
||||||
average: 25
|
average: 40
|
||||||
burst: 50
|
burst: 80
|
||||||
sourceCriterion:
|
sourceCriterion:
|
||||||
ipStrategy:
|
ipStrategy:
|
||||||
depth: 2
|
depth: 2
|
||||||
|
|
|
@ -173,55 +173,55 @@ sanoid_datasets:
|
||||||
### mgrote_proxmox_bind_mounts
|
### mgrote_proxmox_bind_mounts
|
||||||
pve_bind_mounts:
|
pve_bind_mounts:
|
||||||
### fileserver3
|
### fileserver3
|
||||||
- vmid: 115
|
- vmid: 107
|
||||||
mp_nr: 0
|
mp_nr: 0
|
||||||
mp_path_host: /hdd_data/videos
|
mp_path_host: /hdd_data/videos
|
||||||
mp_path_guest: /shares_videos
|
mp_path_guest: /shares_videos
|
||||||
- vmid: 115
|
- vmid: 107
|
||||||
mp_nr: 2
|
mp_nr: 2
|
||||||
mp_path_host: /hdd_data/pve_backup
|
mp_path_host: /hdd_data/pve_backup
|
||||||
mp_path_guest: /shares_pve_backup
|
mp_path_guest: /shares_pve_backup
|
||||||
- vmid: 115
|
- vmid: 107
|
||||||
mp_nr: 3
|
mp_nr: 3
|
||||||
mp_path_host: /hdd_data/papa_backup
|
mp_path_host: /hdd_data/papa_backup
|
||||||
mp_path_guest: /shares_papa_backup
|
mp_path_guest: /shares_papa_backup
|
||||||
- vmid: 115
|
- vmid: 107
|
||||||
mp_nr: 4
|
mp_nr: 4
|
||||||
mp_path_host: /hdd_data/music
|
mp_path_host: /hdd_data/music
|
||||||
mp_path_guest: /shares_music
|
mp_path_guest: /shares_music
|
||||||
- vmid: 115
|
- vmid: 107
|
||||||
mp_nr: 5
|
mp_nr: 5
|
||||||
mp_path_host: /hdd_data/tmp
|
mp_path_host: /hdd_data/tmp
|
||||||
mp_path_guest: /shares_tmp
|
mp_path_guest: /shares_tmp
|
||||||
- vmid: 115
|
- vmid: 107
|
||||||
mp_nr: 6
|
mp_nr: 6
|
||||||
mp_path_host: /hdd_data/archiv
|
mp_path_host: /hdd_data/archiv
|
||||||
mp_path_guest: /shares_archiv
|
mp_path_guest: /shares_archiv
|
||||||
- vmid: 115
|
- vmid: 107
|
||||||
mp_nr: 7
|
mp_nr: 7
|
||||||
mp_path_host: /hdd_data/bilder
|
mp_path_host: /hdd_data/bilder
|
||||||
mp_path_guest: /shares_bilder
|
mp_path_guest: /shares_bilder
|
||||||
- vmid: 115
|
- vmid: 107
|
||||||
mp_nr: 9
|
mp_nr: 9
|
||||||
mp_path_host: /hdd_data/scans
|
mp_path_host: /hdd_data/scans
|
||||||
mp_path_guest: /shares_scans
|
mp_path_guest: /shares_scans
|
||||||
- vmid: 115
|
- vmid: 107
|
||||||
mp_nr: 10
|
mp_nr: 10
|
||||||
mp_path_host: /hdd_data/restic
|
mp_path_host: /hdd_data/restic
|
||||||
mp_path_guest: /shares_restic
|
mp_path_guest: /shares_restic
|
||||||
- vmid: 115
|
- vmid: 107
|
||||||
mp_nr: 12
|
mp_nr: 12
|
||||||
mp_path_host: /hdd_data/backup
|
mp_path_host: /hdd_data/backup
|
||||||
mp_path_guest: /shares_backup
|
mp_path_guest: /shares_backup
|
||||||
- vmid: 115
|
- vmid: 107
|
||||||
mp_nr: 14
|
mp_nr: 14
|
||||||
mp_path_host: /hdd_data/buecher
|
mp_path_host: /hdd_data/buecher
|
||||||
mp_path_guest: /shares_buecher
|
mp_path_guest: /shares_buecher
|
||||||
- vmid: 115
|
- vmid: 107
|
||||||
mp_nr: 15
|
mp_nr: 15
|
||||||
mp_path_host: /hdd_data/programme
|
mp_path_host: /hdd_data/programme
|
||||||
mp_path_guest: /shares_programme
|
mp_path_guest: /shares_programme
|
||||||
- vmid: 115
|
- vmid: 107
|
||||||
mp_nr: 16
|
mp_nr: 16
|
||||||
mp_path_host: /hdd_data/vm
|
mp_path_host: /hdd_data/vm
|
||||||
mp_path_guest: /shares_vm
|
mp_path_guest: /shares_vm
|
||||||
|
|
|
@ -2,7 +2,7 @@
|
||||||
- hosts: all
|
- hosts: all
|
||||||
gather_facts: false
|
gather_facts: false
|
||||||
roles:
|
roles:
|
||||||
- role: ansible-role-bootstrap
|
- role: robertdebock.bootstrap
|
||||||
tags: "bootstrap"
|
tags: "bootstrap"
|
||||||
become: true
|
become: true
|
||||||
- role: mgrote_apt_manage_sources
|
- role: mgrote_apt_manage_sources
|
||||||
|
@ -47,3 +47,8 @@
|
||||||
|
|
||||||
|
|
||||||
# Nach dem ersten durchlaufen ist keine Anmeldung mehr per Passwort & ssh möglich. Damit scheitert auch der Versuch das Playbook ein zweites mal durchlaufen zu lassen.
|
# Nach dem ersten durchlaufen ist keine Anmeldung mehr per Passwort & ssh möglich. Damit scheitert auch der Versuch das Playbook ein zweites mal durchlaufen zu lassen.
|
||||||
|
|
||||||
|
# Vorher benötigt werden:
|
||||||
|
# sudo adduser mg
|
||||||
|
# sudo adduser mg sudo
|
||||||
|
# sudo apt install openssh-sever
|
||||||
|
|
|
@ -4,6 +4,9 @@
|
||||||
- role: mgrote_systemd_resolved
|
- role: mgrote_systemd_resolved
|
||||||
tags: "dns"
|
tags: "dns"
|
||||||
become: true
|
become: true
|
||||||
|
- role: mgrote_pip_pre_tasks
|
||||||
|
tags: "pip_pre"
|
||||||
|
become: true
|
||||||
- role: geerlingguy.pip
|
- role: geerlingguy.pip
|
||||||
tags: "pip"
|
tags: "pip"
|
||||||
become: true
|
become: true
|
||||||
|
|
|
@ -4,7 +4,6 @@
|
||||||
- role: mgrote_munin_node
|
- role: mgrote_munin_node
|
||||||
become: true
|
become: true
|
||||||
tags: "munin"
|
tags: "munin"
|
||||||
when: "not 'laptop' in group_names"
|
|
||||||
|
|
||||||
### Die Host müssen auch beim Docker-Container: "munin-master eingetragen" werden.
|
### Die Host müssen auch beim Docker-Container: "munin-master eingetragen" werden.
|
||||||
### wird nur auf physischen Rechnern ausgeführt.
|
### wird nur auf physischen Rechnern ausgeführt.
|
||||||
|
|
|
@ -24,3 +24,4 @@
|
||||||
tags: "ssh"
|
tags: "ssh"
|
||||||
- role: mgrote_netplan
|
- role: mgrote_netplan
|
||||||
tags: "netplan"
|
tags: "netplan"
|
||||||
|
when: "not 'fileserver' in group_names"
|
||||||
|
|
|
@ -5,3 +5,5 @@
|
||||||
state: restarted
|
state: restarted
|
||||||
daemon_reload: true
|
daemon_reload: true
|
||||||
name: fwupd-refresh.service
|
name: fwupd-refresh.service
|
||||||
|
when:
|
||||||
|
- "'fwupd-refresh.service' in services"
|
||||||
|
|
15
roles/mgrote_pip_pre_tasks/tasks/main.yml
Normal file
15
roles/mgrote_pip_pre_tasks/tasks/main.yml
Normal file
|
@ -0,0 +1,15 @@
|
||||||
|
---
|
||||||
|
# Remove EXTERNALLY-MANAGED file
|
||||||
|
# Related issue: https://github.com/geerlingguy/ansible-role-pip/issues/57 + https://www.jeffgeerling.com/blog/2023/how-solve-error-externally-managed-environment-when-installing-pip3
|
||||||
|
|
||||||
|
- name: Get Python 3.X version
|
||||||
|
ansible.builtin.command: python3 --version
|
||||||
|
register: pyver
|
||||||
|
changed_when: false
|
||||||
|
failed_when: pyver.rc != 0
|
||||||
|
|
||||||
|
- name: Ignore PEP 668 because it's silly.
|
||||||
|
ansible.builtin.file:
|
||||||
|
state: absent
|
||||||
|
path: "/usr/lib/python{{ pyver.stdout.split()[1] | regex_search('([0-9]+\\.[0-9]+)') }}/EXTERNALLY-MANAGED"
|
||||||
|
when: pyver.stdout | regex_search('3\.[0-9]+')
|
|
@ -20,8 +20,6 @@
|
||||||
register: restart
|
register: restart
|
||||||
changed_when:
|
changed_when:
|
||||||
- restart.rc == 25
|
- restart.rc == 25
|
||||||
failed_when:
|
|
||||||
- restart.rc != 25
|
|
||||||
notify: restart lxc
|
notify: restart lxc
|
||||||
# füge bind-mount hinzu falls er fehlt, also rc ungleich 0
|
# füge bind-mount hinzu falls er fehlt, also rc ungleich 0
|
||||||
# pro bind-mount
|
# pro bind-mount
|
||||||
|
|
|
@ -2,6 +2,6 @@
|
||||||
- name: restart sshd
|
- name: restart sshd
|
||||||
become: true
|
become: true
|
||||||
ansible.builtin.systemd:
|
ansible.builtin.systemd:
|
||||||
name: sshd
|
name: ssh
|
||||||
enabled: true
|
enabled: true
|
||||||
state: restarted
|
state: restarted
|
||||||
|
|
|
@ -2,7 +2,7 @@
|
||||||
- name: Vundle - PluginInstall # noqa no-changed-when risky-shell-pipe
|
- name: Vundle - PluginInstall # noqa no-changed-when risky-shell-pipe
|
||||||
become: true
|
become: true
|
||||||
become_user: "{{ item.user }}"
|
become_user: "{{ item.user }}"
|
||||||
ansible.builtin.shell: yes | vim -c PluginInstall -c qall
|
ansible.builtin.shell: yes yes yes | vim -c PluginInstall -c qall
|
||||||
args:
|
args:
|
||||||
chdir: "{{ item.home }}"
|
chdir: "{{ item.home }}"
|
||||||
loop: "{{ dotfiles }}"
|
loop: "{{ dotfiles }}"
|
||||||
|
|
Loading…
Reference in a new issue