xoxys.packages/tasks/repository.yml
Robert Kaussow 5843c82fe7
All checks were successful
continuous-integration/drone/push Build is passing
fix: remove recommended packages by default
2022-03-09 22:30:12 +01:00

42 lines
1.3 KiB
YAML

---
- block:
- name: Remove repositories
file:
name: "/etc/packages.repos.d/{{ item }}"
state: absent
loop: "{{ packages_repofiles_remove }}"
loop_control:
label: "/etc/packages.repos.d/{{ item }}"
- name: Add common repositories
yum_repository:
name: "{{ item.name }}"
file: "{{ item.filename }}"
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
- name: Uninstall packages
package:
name: "{{ item }}"
enablerepo: "{{ packages_enablerepo }}"
state: absent
loop: "{{ packages_uninstall + packages_uninstall_extra }}"
- name: Install common packages
package:
name: "{{ item }}"
enablerepo: "{{ packages_enablerepo }}"
state: present
loop: "{{ packages_install + packages_install_extra }}"
become: True
become_user: root