Skip to content

Commit

Permalink
[FIX] rhel epel relase
Browse files Browse the repository at this point in the history
  • Loading branch information
ismoilovdevml committed Sep 17, 2024
1 parent f1f8200 commit 8af11a9
Show file tree
Hide file tree
Showing 2 changed files with 52 additions and 0 deletions.
22 changes: 22 additions & 0 deletions Ansible/update-upgrade/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
# 📋 Update & Install Tools Playbook

This Ansible playbook updates the Linux server system and installs essential tools.

## 🛠️ Usage
To run the playbook, use the following command:

```bash
ansible-playbook -i inventory.ini ./update_upgrade_tools.yml
```

💻 Supported Linux Operating Systems
* 🐧 Debian(11,12)
* 🐧 Ubuntu(20.04,22.04)
* 🐧 RHEL(7,8)
* 🐧 Fedora(39.40)

✅ Tested Operating Systems

* ✅Debian(11,12)
* ✅Ubuntu(20.04,22.04)
* ✅RHEL(7,8)
30 changes: 30 additions & 0 deletions Ansible/update-upgrade/update_upgrade_tools.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,27 @@
upgrade: dist
when: ansible_distribution in ['Ubuntu', 'Debian']

- name: Install GPG key for EPEL on RHEL
block:
- name: Install GPG key for EPEL
ansible.builtin.rpm_key:
state: present
key: https://dl.fedoraproject.org/pub/epel/RPM-GPG-KEY-EPEL-{{ ansible_distribution_major_version }}
when: ansible_distribution in ['RedHat']

- name: Install EPEL repository on RHEL (manual download)
block:
- name: Download EPEL repository RPM for RHEL
ansible.builtin.get_url:
url: "https://dl.fedoraproject.org/pub/epel/epel-release-latest-{{ ansible_distribution_major_version }}.noarch.rpm"
dest: "/tmp/epel-release.rpm"

- name: Install EPEL repository RPM for RHEL
ansible.builtin.yum:
name: "/tmp/epel-release.rpm"
state: present
when: ansible_distribution in ['RedHat']

- name: Update and upgrade CentOS/RHEL
block:
- name: Update package list
Expand Down Expand Up @@ -53,6 +74,9 @@
- wget
- vim
- htop
- nano
- net-tools
- traceroute
state: present
when: ansible_distribution in ['Ubuntu', 'Debian']

Expand All @@ -66,6 +90,9 @@
- wget
- vim
- htop
- nano
- net-tools
- traceroute
state: present
when: ansible_distribution in ['CentOS', 'RedHat']

Expand All @@ -79,5 +106,8 @@
- wget
- vim
- htop
- nano
- net-tools
- traceroute
state: present
when: ansible_distribution == 'Fedora'

0 comments on commit 8af11a9

Please sign in to comment.