Merge pull request 'Add playbook for Fedora upgrade to next release' (#25) from fedora-release-upgrade into main
Reviewed-on: #25
This commit is contained in:
commit
2c1e709682
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:
|
||||
$(AP) playbooks/fedora.yml
|
||||
|
||||
fedora-release-upgrade:
|
||||
$(AP) playbooks/fedora_upgrade.yml
|
||||
|
||||
deps:
|
||||
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