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