xoxys.packages/tasks/main.yml
Robert Kaussow 0078fd95a2
Some checks failed
ci/woodpecker/push/lint Pipeline failed
ci/woodpecker/push/test unknown status
ci/woodpecker/push/notify Pipeline was successful
ci/woodpecker/push/docs unknown status
ci: migrate to woodpecker
2024-02-18 20:30:22 +01:00

55 lines
1.6 KiB
YAML

---
- name: Uninstall prerequisite packages
ansible.builtin.package:
name: "{{ item }}"
state: absent
loop: "{{ packages_uninstall_pre + packages_uninstall_pre_extra }}"
- 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 common 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
- 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 }}"