2024-03-29 01:57:37 +01:00
|
|
|
---
|
|
|
|
- name: install our repos
|
|
|
|
hosts: all
|
|
|
|
become: true
|
|
|
|
|
2024-04-28 02:49:20 +02:00
|
|
|
vars:
|
|
|
|
version: "{{ version | default('40') }}"
|
|
|
|
base_path: "{{ base_path | '/web/repos/Fedora' }}"
|
|
|
|
|
2024-03-29 01:57:37 +01:00
|
|
|
tasks:
|
2024-04-19 15:52:13 +02:00
|
|
|
- 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;
|
|
|
|
}
|
|
|
|
});
|
|
|
|
|
2024-03-29 01:57:37 +01:00
|
|
|
- name: Make sure systemd-oomd service unit is stopped
|
|
|
|
systemd_service:
|
2024-04-20 02:23:17 +02:00
|
|
|
state: stopped
|
|
|
|
name: systemd-oomd
|
2024-03-29 01:57:37 +01:00
|
|
|
|
|
|
|
- name: remove other files
|
2024-04-19 18:18:27 +02:00
|
|
|
include_tasks: ../yaml_sub/myrepo_clean.yaml
|
2024-03-29 01:57:37 +01:00
|
|
|
- name: update file myrepo.repo
|
2024-04-19 18:18:27 +02:00
|
|
|
import_tasks: ../yaml_sub/myrepo_data.yaml
|
2024-03-29 01:57:37 +01:00
|
|
|
|
2024-04-20 02:23:17 +02:00
|
|
|
- name: update system
|
2024-03-29 01:57:37 +01:00
|
|
|
dnf:
|
2024-04-19 15:52:13 +02:00
|
|
|
name: "google-chrome-stable,microsoft-edge-stable,code,zoom,microsoft-edge-stable,thunderbird,firefox"
|
2024-03-29 01:57:37 +01:00
|
|
|
state: latest
|
|
|
|
update_cache: true
|
|
|
|
skip_broken: true
|
|
|
|
nobest: false
|
|
|
|
allowerasing: true
|
|
|
|
|
|
|
|
- name: Make sure systemd-oomd service unit is started
|
|
|
|
systemd_service:
|
2024-04-20 02:23:17 +02:00
|
|
|
state: started
|
|
|
|
name: systemd-oomd
|
2024-03-29 01:57:37 +01:00
|
|
|
|
2024-04-19 15:52:13 +02:00
|
|
|
- name: stop shutdown embargo
|
|
|
|
ansible.builtin.file:
|
|
|
|
path: /etc/polkit-1/rules.d/55-inhibit-shutdown.rules
|
2024-04-20 02:23:17 +02:00
|
|
|
state: "absent"
|