Logging
This commit is contained in:
parent
99ad79b8d2
commit
03e805f501
1 changed files with 18 additions and 7 deletions
|
|
@ -6,19 +6,25 @@
|
|||
block:
|
||||
- name: "Add rpmfustion repo gpg keys"
|
||||
ansible.builtin.rpm_key:
|
||||
key: "{{ item }}"
|
||||
key: "{{ rpmfusion_keys }}"
|
||||
state: present
|
||||
with_items: "{{ rpmfusion_keys }}"
|
||||
register: rpmfusion_keys_errors
|
||||
|
||||
- name: "Install the rpmfusion repo packages"
|
||||
ansible.builtin.dnf:
|
||||
name: "{{ item }}"
|
||||
name: "{{ rpmfusion_repos }}"
|
||||
state: present
|
||||
with_items: "{{ rpmfusion_repos }}"
|
||||
register: rpmfusion_repo_errors
|
||||
|
||||
rescue:
|
||||
- ansible.builtin.debug:
|
||||
msg: "rpmfusion Repos konnten nicht hinzugefügt werden."
|
||||
- name: "Log errors"
|
||||
ansible.builtin.lineinfile:
|
||||
dest: "{{ log_path }}"
|
||||
line: >-
|
||||
[ERR] {{ item }}
|
||||
with_items:
|
||||
- "{{ rpmfusion_keys_errors }}"
|
||||
- "{{ rpmfusion_repo_errors }}"
|
||||
|
||||
- name: "Remove and install dnf software"
|
||||
become: true
|
||||
|
|
@ -27,12 +33,14 @@
|
|||
ansible.builtin.dnf:
|
||||
name: "{{ rem_packages }}"
|
||||
state: absent
|
||||
register: dnf_uninstall_errors
|
||||
|
||||
|
||||
- name: "Install all current updates"
|
||||
ansible.builtin.dnf:
|
||||
name: "*"
|
||||
state: latest
|
||||
register: dnf_update_errors
|
||||
|
||||
- name: "Install packages"
|
||||
ansible.builtin.dnf:
|
||||
|
|
@ -46,7 +54,10 @@
|
|||
dest: "{{ log_path }}"
|
||||
line: >-
|
||||
[ERR] {{ item }}
|
||||
with_items: "{{ dnf_install_errors.failures }}"
|
||||
with_items:
|
||||
- "{{ dnf_uninstall_errors }}"
|
||||
- "{{ dnf_update_errors }}"
|
||||
- "{{ dnf_install_errors.failures }}"
|
||||
|
||||
|
||||
- name: "Install Flatpaks"
|
||||
|
|
|
|||
Loading…
Reference in a new issue