From 980b8b24ff9bfe62774e3c3828f88009d6c920b5 Mon Sep 17 00:00:00 2001 From: ismoilovdevml Date: Tue, 17 Sep 2024 14:43:12 +0500 Subject: [PATCH] [FIX] fixed bugs in minio uinstall and rhel --- Ansible/minio/README.md | 43 +++++++++++++++++++ .../{minio_install.yml => install_minio.yml} | 0 Ansible/minio/uninstall_minio.yml | 18 +++++--- Ansible/minio/{main.yml => vars.yml} | 0 Ansible/update-upgrade/README.md | 24 +++++++---- 5 files changed, 71 insertions(+), 14 deletions(-) create mode 100644 Ansible/minio/README.md rename Ansible/minio/{minio_install.yml => install_minio.yml} (100%) rename Ansible/minio/{main.yml => vars.yml} (100%) diff --git a/Ansible/minio/README.md b/Ansible/minio/README.md new file mode 100644 index 0000000..5a4c0ea --- /dev/null +++ b/Ansible/minio/README.md @@ -0,0 +1,43 @@ +# πŸ“‹ MinIO Object Storage Installation Playbook + +This playbook installs MinIO as a binary on servers using the **Single-Node Single-Drive** installation method. + +## πŸ› οΈ Usage + +In the `vars.yml` file, the following variables should be defined: + +```yml +--- +minio_directory: /mnt/data +minio_admin_user: admin +minio_admin_user_password: wo#*4fd-LDSsgsa +``` +# Install MinIO +Run the following command to install MinIO on your servers: +```bash +ansible-playbook -i inventory.ini ./install_minio.yml +``` +# Clean up and Uninstall MinIO +To clean up and uninstall MinIO, use the following command: +```bash +ansible-playbook -i inventory.ini ./uninstall_minio.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 + +# βš™οΈ Supported Ansible Versions +* βœ… ansible [core 2.16.3] +* ❗️ ansible [core 2.17.3] (compatibility issues) + +> Note: The playbook assumes you are running Ansible as the `root` user. \ No newline at end of file diff --git a/Ansible/minio/minio_install.yml b/Ansible/minio/install_minio.yml similarity index 100% rename from Ansible/minio/minio_install.yml rename to Ansible/minio/install_minio.yml diff --git a/Ansible/minio/uninstall_minio.yml b/Ansible/minio/uninstall_minio.yml index dc8aaab..b44068d 100644 --- a/Ansible/minio/uninstall_minio.yml +++ b/Ansible/minio/uninstall_minio.yml @@ -5,13 +5,20 @@ vars_files: - main.yml tasks: + + - name: Check if MinIO service exists + command: systemctl is-active --quiet minio + register: minio_service_status + failed_when: false + changed_when: false + ignore_errors: yes - - name: Stop and disable MinIO service - systemd: + - name: Stop and disable MinIO service if it exists + ansible.builtin.systemd: name: minio state: stopped enabled: no - ignore_errors: yes + when: minio_service_status.rc == 0 - name: Remove MinIO service file file: @@ -19,7 +26,7 @@ state: absent - name: Reload systemd daemon - systemd: + ansible.builtin.systemd: daemon_reload: yes - name: Remove MinIO binary @@ -36,8 +43,9 @@ become: yes file: path: "{{ minio_directory }}" - state: absent + state: directory recurse: yes + force: yes ignore_errors: yes - name: Remove MinIO data directory diff --git a/Ansible/minio/main.yml b/Ansible/minio/vars.yml similarity index 100% rename from Ansible/minio/main.yml rename to Ansible/minio/vars.yml diff --git a/Ansible/update-upgrade/README.md b/Ansible/update-upgrade/README.md index 5489df9..69588c2 100644 --- a/Ansible/update-upgrade/README.md +++ b/Ansible/update-upgrade/README.md @@ -9,14 +9,20 @@ To run the playbook, use the following command: 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) +# πŸ’» Supported Linux Operating Systems +* 🐧 **Debian:** 11,12 +* 🐧 **Ubuntu:** 20.04,22.04 +* 🐧 **RHEL:** 7,8 +* 🐧 **Fedora:** 39,40 -βœ… Tested Operating Systems +# βœ… Tested Operating Systems -* βœ…Debian(11,12) -* βœ…Ubuntu(20.04,22.04) -* βœ…RHEL(7,8) \ No newline at end of file +* βœ…**Debian:** 11,12 +* βœ…**Ubuntu:** 20.04,22.04 +* βœ…**RHEL:** 7,8 + +# βš™οΈ Supported Ansible Versions +* βœ… ansible [core 2.16.3] +* ❗️ ansible [core 2.17.3] (compatibility issues) + +> Note: The playbook assumes you are running Ansible as the `root` user. \ No newline at end of file