-
Notifications
You must be signed in to change notification settings - Fork 113
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
04a6f50
commit f6df01c
Showing
4 changed files
with
46 additions
and
1 deletion.
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
17 changes: 17 additions & 0 deletions
17
discovery/roles/postscripts/redhat/files/omnia_disable_repo
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,17 @@ | ||
#!/bin/bash | ||
################################################################################################################ | ||
# omnia_disablerepo: | ||
# Disable omnia repository | ||
# | ||
################################################################################################################# | ||
internet_repo_file_list="oracle-linux-ol8.repo uek-ol8.repo Rocky-AppStream.repo Rocky-BaseOS.repo Rocky-Extras.repo CentOS-Base.repo" | ||
|
||
for repo_file in $internet_repo_file_list | ||
do | ||
if [ -f /etc/yum.repos.d/$repo_file ]; then | ||
echo "Disabling repos $repo_file" >> /var/log/xcat/xcat.log | ||
sed -i -e 's/enabled=1/enabled=0/' /etc/yum.repos.d/$repo_file | ||
fi | ||
done | ||
|
||
dnf clean all |
25 changes: 25 additions & 0 deletions
25
discovery/roles/postscripts/redhat/tasks/configure_postscripts.yml
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,25 @@ | ||
# Copyright 2024 Dell Inc. or its subsidiaries. All Rights Reserved. | ||
# | ||
# Licensed under the Apache License, Version 2.0 (the "License"); | ||
# you may not use this file except in compliance with the License. | ||
# You may obtain a copy of the License at | ||
# | ||
# http://www.apache.org/licenses/LICENSE-2.0 | ||
# | ||
# Unless required by applicable law or agreed to in writing, software | ||
# distributed under the License is distributed on an "AS IS" BASIS, | ||
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
# See the License for the specific language governing permissions and | ||
# limitations under the License. | ||
--- | ||
|
||
- name: Copy omnia_disable_repo script to postscripts | ||
ansible.builtin.template: | ||
src: "{{ item.src }}" | ||
dest: "{{ item.dest }}" | ||
mode: "{{ item.mode }}" | ||
with_items: "{{ omnia_disable_repo_postscripts_path }}" | ||
|
||
- name: Configure postscripts for omnia_disable_repo | ||
ansible.builtin.command: chdef all -p postscripts=omnia_disable_repo | ||
changed_when: 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