63 lines
1.8 KiB
YAML
63 lines
1.8 KiB
YAML
---
|
|
- name: upgrade to next version
|
|
hosts: all
|
|
become: true
|
|
|
|
tasks:
|
|
# 39 -> 40
|
|
- name: remove libva-intel-media-driver
|
|
dnf:
|
|
name: "libva-intel-media-driver"
|
|
state: absent
|
|
update_cache: true
|
|
skip_broken: true
|
|
nobest: false
|
|
allowerasing: true
|
|
|
|
- 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
|
|
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: install system-upgrade
|
|
dnf:
|
|
name: "dnf-command(system-upgrade)"
|
|
state: present
|
|
update_cache: true
|
|
skip_broken: true
|
|
nobest: false
|
|
allowerasing: true
|
|
|
|
- name: upgrade version
|
|
shell: "dnf -y system-upgrade download --refresh --releasever={{version}} --allowerasing --best --skip-broken; dnf system-upgrade reboot"
|
|
|
|
- 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"
|