Fix MinIO: remove --console-address flag (not supported in newer versions)

This commit is contained in:
Jino Jose 2026-06-23 15:51:55 +05:30
parent 148241bfae
commit e472a83901

View File

@ -34,16 +34,18 @@
content: | content: |
MINIO_ROOT_USER=cezenadmin MINIO_ROOT_USER=cezenadmin
MINIO_ROOT_PASSWORD=Cezen@2024! MINIO_ROOT_PASSWORD=Cezen@2024!
MINIO_VOLUMES="/opt/cezen/data/minio" MINIO_VOLUMES=/opt/cezen/data/minio
MINIO_OPTS="--console-address :9001"
mode: "0640" mode: "0640"
owner: cezen owner: root
group: cezen group: root
- name: Create MinIO systemd service - name: Create MinIO systemd service
copy: copy:
dest: /etc/systemd/system/minio.service dest: /etc/systemd/system/minio.service
content: | # Use | block to avoid Ansible interpreting $ signs
content: "{{ minio_service }}"
vars:
minio_service: |
[Unit] [Unit]
Description=MinIO Object Storage Description=MinIO Object Storage
Documentation=https://docs.min.io Documentation=https://docs.min.io
@ -54,27 +56,25 @@
User=cezen User=cezen
Group=cezen Group=cezen
EnvironmentFile=/etc/default/minio EnvironmentFile=/etc/default/minio
ExecStartPre=/bin/bash -c "if [ -z \"${MINIO_VOLUMES}\" ]; then echo 'Variable MINIO_VOLUMES not set'; exit 1; fi" ExecStart=/usr/local/bin/minio server $MINIO_VOLUMES
ExecStart=/usr/local/bin/minio server ${MINIO_VOLUMES} ${MINIO_OPTS}
Restart=always Restart=always
RestartSec=5 RestartSec=5
LimitNOFILE=65536 LimitNOFILE=65536
[Install] [Install]
WantedBy=multi-user.target WantedBy=multi-user.target
mode: "0644"
- name: Enable and start MinIO - name: Enable and start MinIO
systemd: systemd:
name: minio name: minio
enabled: yes enabled: yes
state: started state: restarted
daemon_reload: yes daemon_reload: yes
- name: Wait for MinIO to be ready - name: Wait for MinIO API to be ready
wait_for: wait_for:
host: localhost host: localhost
port: 9001 port: 9000
timeout: 60 timeout: 60
ignore_errors: true ignore_errors: true
@ -85,4 +85,5 @@
mc mb local/models --ignore-existing mc mb local/models --ignore-existing
mc mb local/datasets --ignore-existing mc mb local/datasets --ignore-existing
retries: 3 retries: 3
delay: 5 delay: 10
ignore_errors: true