Skip to content

Commit 39cf556

Browse files
committed
cleaned up disabling repos + now optional
1 parent 741872a commit 39cf556

File tree

2 files changed

+5
-16
lines changed

2 files changed

+5
-16
lines changed

ansible/roles/dnf_repos/defaults/main.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@ dnf_repos_pulp_url: "{{ appliances_pulp_url }}"
22
dnf_repos_pulp_content_url: "{{ dnf_repos_pulp_url }}/pulp/content"
33
dnf_repos_rocky_prefix: "{{ ansible_distribution | lower }}/{{ ansible_distribution_version }}"
44
dnf_repos_epel_prefix: "epel/{{ ansible_distribution_major_version }}"
5+
dnf_repos_disable: true
56

67
# epel installed separately
78
dnf_repos_repolist:
Lines changed: 4 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,6 @@
11
---
22
- name: Disable Pulp repos and remove creds
3-
ansible.builtin.yum_repository:
4-
file: "{{ item.file }}"
5-
name: "{{ item.name }}"
6-
baseurl: "{{ item.base_url }}"
7-
description: "{{ item.name }}"
8-
enabled: false
9-
loop: "{{ dnf_repos_repolist }}"
10-
11-
- name: Disable EPEL repo and remove creds
12-
ansible.builtin.yum_repository:
13-
name: epel
14-
file: epel
15-
description: epel
16-
baseurl: "{{ dnf_repos_epel_baseurl }}"
17-
gpgcheck: false
18-
enabled: false
3+
ansible.builtin.yum:
4+
disablerepo: "{{ item.name }}"
5+
loop: "{{ dnf_repos_repolist + [epel] }}"
6+
when: dnf_repos_disable

0 commit comments

Comments
 (0)