2025-03-03 07:10:00 +00:00
|
|
|
---
|
|
|
|
|
# tasks file for fedora
|
|
|
|
|
|
2025-04-28 09:52:41 +00:00
|
|
|
- name: "Adding rpmfusion repos"
|
|
|
|
|
become: true
|
|
|
|
|
block:
|
|
|
|
|
- name: "Add rpmfustion repo gpg keys"
|
|
|
|
|
ansible.builtin.rpm_key:
|
2025-04-29 13:53:18 +00:00
|
|
|
key: "{{ rpmfusion_keys }}"
|
2025-04-28 09:52:41 +00:00
|
|
|
state: present
|
2025-04-29 13:53:18 +00:00
|
|
|
register: rpmfusion_keys_errors
|
2025-04-28 09:52:41 +00:00
|
|
|
|
|
|
|
|
- name: "Install the rpmfusion repo packages"
|
|
|
|
|
ansible.builtin.dnf:
|
2025-04-29 13:53:18 +00:00
|
|
|
name: "{{ rpmfusion_repos }}"
|
2025-04-28 09:52:41 +00:00
|
|
|
state: present
|
2025-04-29 13:53:18 +00:00
|
|
|
register: rpmfusion_repo_errors
|
2025-04-28 09:52:41 +00:00
|
|
|
|
2025-04-28 09:56:36 +00:00
|
|
|
rescue:
|
2025-04-29 13:53:18 +00:00
|
|
|
- name: "Log errors"
|
|
|
|
|
ansible.builtin.lineinfile:
|
|
|
|
|
dest: "{{ log_path }}"
|
|
|
|
|
line: >-
|
|
|
|
|
[ERR] {{ item }}
|
|
|
|
|
with_items:
|
|
|
|
|
- "{{ rpmfusion_keys_errors }}"
|
|
|
|
|
- "{{ rpmfusion_repo_errors }}"
|
2025-04-28 09:52:41 +00:00
|
|
|
|
|
|
|
|
- name: "Remove and install dnf software"
|
2025-04-28 20:24:23 +00:00
|
|
|
become: true
|
2025-04-28 09:52:41 +00:00
|
|
|
block:
|
|
|
|
|
- name: "Remove unnecassary packages"
|
|
|
|
|
ansible.builtin.dnf:
|
2025-04-28 13:42:25 +00:00
|
|
|
name: "{{ rem_packages }}"
|
2025-04-28 09:52:41 +00:00
|
|
|
state: absent
|
2025-04-29 13:53:18 +00:00
|
|
|
register: dnf_uninstall_errors
|
2025-04-28 09:52:41 +00:00
|
|
|
|
|
|
|
|
|
|
|
|
|
- name: "Install all current updates"
|
|
|
|
|
ansible.builtin.dnf:
|
|
|
|
|
name: "*"
|
|
|
|
|
state: latest
|
2025-04-29 13:53:18 +00:00
|
|
|
register: dnf_update_errors
|
2025-04-28 09:52:41 +00:00
|
|
|
|
|
|
|
|
- name: "Install packages"
|
|
|
|
|
ansible.builtin.dnf:
|
2025-04-28 13:42:25 +00:00
|
|
|
name: "{{ packages }}"
|
2025-04-28 09:52:41 +00:00
|
|
|
state: present
|
2025-04-28 14:03:40 +00:00
|
|
|
register: dnf_install_errors
|
2025-04-28 09:52:41 +00:00
|
|
|
|
2025-04-28 14:03:40 +00:00
|
|
|
rescue:
|
2025-04-28 14:15:24 +00:00
|
|
|
- name: "Log errors"
|
2025-04-28 19:43:26 +00:00
|
|
|
ansible.builtin.lineinfile:
|
2025-04-28 20:24:23 +00:00
|
|
|
dest: "{{ log_path }}"
|
2025-04-28 14:15:24 +00:00
|
|
|
line: >-
|
2025-04-28 19:43:26 +00:00
|
|
|
[ERR] {{ item }}
|
2025-04-29 13:53:18 +00:00
|
|
|
with_items:
|
|
|
|
|
- "{{ dnf_uninstall_errors }}"
|
|
|
|
|
- "{{ dnf_update_errors }}"
|
|
|
|
|
- "{{ dnf_install_errors.failures }}"
|
2025-04-28 14:01:12 +00:00
|
|
|
|
2025-04-28 09:52:41 +00:00
|
|
|
|
|
|
|
|
- name: "Install Flatpaks"
|
2025-03-03 07:10:00 +00:00
|
|
|
flatpak:
|
2025-04-28 13:42:25 +00:00
|
|
|
name: "{{ flatpaks }}"
|
2025-03-03 07:10:00 +00:00
|
|
|
state: present
|