2024-09-25 19:52:07 +00:00
|
|
|
---
|
|
|
|
- name: Adjust dnf config file
|
|
|
|
ansible.builtin.template:
|
|
|
|
src: etc/dnf/dnf.conf.j2
|
|
|
|
dest: /etc/dnf/dnf.conf
|
|
|
|
owner: root
|
|
|
|
group: root
|
|
|
|
mode: "0644"
|
|
|
|
|
|
|
|
- name: Remove repository files
|
|
|
|
ansible.builtin.file:
|
|
|
|
name: "/etc/yum.repos.d/{{ item }}"
|
|
|
|
state: absent
|
|
|
|
loop: "{{ packages_repofiles_remove }}"
|
|
|
|
loop_control:
|
|
|
|
label: "/etc/yum.repos.d/{{ item }}"
|
|
|
|
notify: __packages_clean_metadata
|
|
|
|
|
|
|
|
- name: Add repositories
|
|
|
|
ansible.builtin.yum_repository:
|
|
|
|
name: "{{ item.name }}"
|
|
|
|
file: "{{ item.filename | default(omit) }}"
|
|
|
|
description: "{{ item.desc | default(omit) }}"
|
|
|
|
baseurl: "{{ item.baseurl | default(omit) }}"
|
|
|
|
gpgkey: "{{ item.gpgkey | default(omit) }}"
|
|
|
|
gpgcheck: "{{ item.gpgcheck | default('yes') }}"
|
|
|
|
sslverify: "{{ item.sslverify | default('yes') }}"
|
|
|
|
enabled: "{{ item.enabled | default('yes') }}"
|
|
|
|
state: "{{ item.state | default('present') }}"
|
|
|
|
loop: "{{ packages_yum_repositories + packages_yum_repositories_extra }}"
|
|
|
|
loop_control:
|
|
|
|
label: "{{ item.name }}"
|
|
|
|
notify:
|
|
|
|
- __packages_upgrade
|
|
|
|
- __packages_clean_metadata
|
2024-09-25 20:27:12 +00:00
|
|
|
|
|
|
|
- name: Uninstall packages
|
|
|
|
ansible.builtin.package:
|
|
|
|
name: "{{ item }}"
|
|
|
|
state: absent
|
|
|
|
loop: "{{ packages_uninstall + packages_uninstall_extra }}"
|
|
|
|
|
|
|
|
- name: Install common packages
|
|
|
|
ansible.builtin.package:
|
|
|
|
name: "{{ item }}"
|
|
|
|
enablerepo: "{{ packages_enablerepo }}"
|
|
|
|
state: present
|
|
|
|
loop: "{{ packages_install + packages_install_extra }}"
|