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 0000000000000000000000000000000000000000..85d8f15c6e09dccafa2f20c67912e2b5bed2f23f --- /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