From 273436e1c4a5d9ca4bcf0288c9e2bd213bd71eea Mon Sep 17 00:00:00 2001 From: Nicolas <nicolas@bejean.fr> Date: Sun, 12 Nov 2023 17:46:38 +0000 Subject: [PATCH] feat: add minio playbook --- ...eployer-un-cluster-minio-sous-proxmox.yaml | 56 +++++++++++++++++++ 1 file changed, 56 insertions(+) create mode 100644 proxmox/deployer-un-cluster-minio-sous-proxmox.yaml diff --git a/proxmox/deployer-un-cluster-minio-sous-proxmox.yaml b/proxmox/deployer-un-cluster-minio-sous-proxmox.yaml new file mode 100644 index 0000000..85d8f15 --- /dev/null +++ b/proxmox/deployer-un-cluster-minio-sous-proxmox.yaml @@ -0,0 +1,56 @@ +- name: "Install Minio" + hosts: + - minio1 + - minio2 + - minio3 + vars: + minio_admin_user: admin + minio_admin_password: <resultat-de-la-commande-ansible-vault> + minio_volumes: "http://minio{1...3}.mon-reseau-local.lan:9000/mnt/disk{1...3}/minio" + minio_loadbalancer_url: "http://minio.mon-reseau-local.lan:9000" + minio_browser_redirect_url: "http://minio.mon-reseau-local.lan:9001" + tasks: + - name: Check file exists + stat: + path: "/tmp/minio.deb" + register: file_info + + - name: Download Minio + get_url: + url: https://dl.min.io/server/minio/release/linux-amd64/archive/minio_20231106222608.0.0_amd64.deb + dest: /tmp/minio.deb + when: not file_info.stat.exists + + - name: Install Minio + apt: + deb: /tmp/minio.deb + become: yes + when: not file_info.stat.exists + + - name: Create group + group: + name: minio-user + state: present + + - name: Create user + user: + name: minio-user + group: minio-user + state: present + createhome: no + system: true + + - name: Copy Minio conf + template: + src: templates/minio.conf.j2 + dest: /etc/default/minio + + - name: Enable Minio service + systemd: + name: minio + enabled: yes + + - name: Start Minio service + systemd: + name: minio + state: restarted -- GitLab