This repository has been archived by the owner on Jan 30, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 81
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add logic to add the RHEL7 optional repo
From multiple possible repo names. Stop doing any more changes once the first is found. Let users disable this as well. Fixes: #5557 Add ansible-pulp logic to add the RHEL7 optional repo https://pulp.plan.io/issues/5557
- Loading branch information
1 parent
dfcb1a4
commit 95e624d
Showing
5 changed files
with
45 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
--- | ||
- name: Determine which in /etc/yum.repos.d/ has the repo | ||
command: grep -l -E "^\[{{ item }}\]" /etc/yum.repos.d/*.repo -R | ||
register: repo_file | ||
changed_when: false | ||
failed_when: false | ||
check_mode: False | ||
|
||
- name: Enable the repo | ||
ini_file: | ||
path: "{{ repo_file.stdout }}" | ||
section: "{{ item }}" | ||
option: enabled | ||
value: 1 | ||
no_extra_spaces: true | ||
when: repo_file.rc == 0 | ||
register: optional_repo_enabled | ||
become: true |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
CentOS.yml |