55 lines
1.2 KiB
YAML
55 lines
1.2 KiB
YAML
---
|
|
# tasks file for fedora
|
|
|
|
- name: "Adding rpmfusion repos"
|
|
become: true
|
|
block:
|
|
- name: "Add rpmfustion repo gpg keys"
|
|
ansible.builtin.rpm_key:
|
|
key: "{{ item }}"
|
|
state: present
|
|
with_items: "{{ rpmfusion_keys }}"
|
|
|
|
- name: "Install the rpmfusion repo packages"
|
|
ansible.builtin.dnf:
|
|
name: "{{ item }}"
|
|
state: present
|
|
with_items: "{{ rpmfusion_repos }}"
|
|
|
|
rescue:
|
|
- ansible.builtin.debug:
|
|
msg: "rpmfusion Repos konnten nicht hinzugefügt werden."
|
|
|
|
- name: "Remove and install dnf software"
|
|
become: true
|
|
block:
|
|
- name: "Remove unnecassary packages"
|
|
ansible.builtin.dnf:
|
|
name: "{{ rem_packages }}"
|
|
state: absent
|
|
|
|
|
|
- name: "Install all current updates"
|
|
ansible.builtin.dnf:
|
|
name: "*"
|
|
state: latest
|
|
|
|
- name: "Install packages"
|
|
ansible.builtin.dnf:
|
|
name: "{{ packages }}"
|
|
state: present
|
|
register: dnf_install_errors
|
|
|
|
rescue:
|
|
- name: "Log errors"
|
|
ansible.builtin.lineinfile:
|
|
dest: /tmp/ansible.log
|
|
line: >-
|
|
[ERR] {{ item }}
|
|
with_items: "{{ dnf_install_errors.failures }}"
|
|
|
|
|
|
- name: "Install Flatpaks"
|
|
flatpak:
|
|
name: "{{ flatpaks }}"
|
|
state: present
|