2022-02-12 13:36:51 +00:00
|
|
|
---
|
|
|
|
- block:
|
|
|
|
- name: Add common package repositories
|
2022-03-09 21:05:52 +00:00
|
|
|
yum_repository:
|
2022-02-12 13:36:51 +00:00
|
|
|
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') }}"
|
2022-03-09 21:05:52 +00:00
|
|
|
loop: "{{ packages_yum_repositories + packages_yum_repositories_extra }}"
|
2022-02-12 13:36:51 +00:00
|
|
|
loop_control:
|
|
|
|
label: "{{ item.name }}"
|
|
|
|
notify: __packages_upgrade
|
|
|
|
|
|
|
|
- name: Remove repo files
|
|
|
|
file:
|
|
|
|
name: "/etc/packages.repos.d/{{ item }}"
|
|
|
|
state: absent
|
|
|
|
loop: "{{ packages_repofiles_remove }}"
|
|
|
|
loop_control:
|
|
|
|
label: "/etc/packages.repos.d/{{ item }}"
|
2022-03-09 21:05:52 +00:00
|
|
|
|
|
|
|
- name: Uninstall common packages
|
|
|
|
package:
|
|
|
|
name: "{{ item }}"
|
|
|
|
enablerepo: "{{ packages_packages_enablerepo }}"
|
|
|
|
state: absent
|
|
|
|
loop: "{{ packages_uninstall }}"
|
|
|
|
|
|
|
|
- name: Install common packages
|
|
|
|
package:
|
|
|
|
name: "{{ item }}"
|
|
|
|
enablerepo: "{{ packages_packages_enablerepo }}"
|
|
|
|
state: present
|
|
|
|
loop: "{{ packages_install + packages_install_extra }}"
|
2022-02-12 13:36:51 +00:00
|
|
|
become: True
|
|
|
|
become_user: root
|