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