Add playbook for Fedora upgrade to next release
Signed-off-by: Matej Focko <me@mfocko.xyz>
This commit is contained in:
parent
ec504f50cf
commit
e7f54b1b53
3 changed files with 36 additions and 0 deletions
3
Makefile
3
Makefile
|
@ -6,6 +6,9 @@ AP := ansible-playbook -vv -K -c local -i localhost, -e ansible_python_interpret
|
||||||
fedora-bootstrap:
|
fedora-bootstrap:
|
||||||
$(AP) playbooks/fedora.yml
|
$(AP) playbooks/fedora.yml
|
||||||
|
|
||||||
|
fedora-release-upgrade:
|
||||||
|
$(AP) playbooks/fedora_upgrade.yml
|
||||||
|
|
||||||
deps:
|
deps:
|
||||||
ansible-galaxy collection install community.general
|
ansible-galaxy collection install community.general
|
||||||
|
|
||||||
|
|
9
playbooks/fedora_upgrade.yml
Normal file
9
playbooks/fedora_upgrade.yml
Normal file
|
@ -0,0 +1,9 @@
|
||||||
|
---
|
||||||
|
- name: Fedora upgrade
|
||||||
|
hosts: all
|
||||||
|
roles:
|
||||||
|
- role: fedora/upgrade
|
||||||
|
become: yes
|
||||||
|
become_method: sudo
|
||||||
|
vars:
|
||||||
|
releasever: 33
|
24
playbooks/roles/fedora/upgrade/tasks/main.yml
Normal file
24
playbooks/roles/fedora/upgrade/tasks/main.yml
Normal file
|
@ -0,0 +1,24 @@
|
||||||
|
---
|
||||||
|
- name: Switch to remote repositories
|
||||||
|
include_role:
|
||||||
|
name: fedora/repositories
|
||||||
|
vars:
|
||||||
|
source: "remote"
|
||||||
|
|
||||||
|
- name: Update all packages
|
||||||
|
dnf:
|
||||||
|
name: '*'
|
||||||
|
state: latest
|
||||||
|
|
||||||
|
- name: Install system-upgrade plugin
|
||||||
|
dnf:
|
||||||
|
name: dnf-plugin-system-upgrade
|
||||||
|
|
||||||
|
- name: Switch to local repositories
|
||||||
|
include_role:
|
||||||
|
name: fedora/repositories
|
||||||
|
vars:
|
||||||
|
source: "local"
|
||||||
|
|
||||||
|
- name: Start the release update
|
||||||
|
shell: dnf system-upgrade download -y --releasever={{ releasever }}
|
Loading…
Reference in a new issue