Playbook
The MinIO module provides two built-in playbooks for cluster management:
minio.yml: Install MinIO clusterminio-rm.yml: Remove MinIO cluster
minio.yml
Playbook minio.yml installs the MinIO module on nodes.
minio-id: Generate/validate minio identity parametersminio_install: Install miniominio_os_user: Create OS user miniominio_pkg: Install minio/mcli packagesminio_dir: Create minio directories
minio_config: Generate minio configurationminio_conf: Minio main config fileminio_cert: Minio SSL certificate issuanceminio_dns: Minio DNS record insertion
minio_launch: Launch minio serviceminio_register: Register minio to monitoringminio_provision: Create minio aliases/buckets/usersminio_alias: Create minio client alias (on admin node)minio_bucket: Create minio bucketsminio_user: Create minio business users
Before running the playbook, complete the MinIO cluster configuration in the config inventory.
The playbook automatically skips hosts without minio_seq defined. This means you can safely execute the playbook on mixed host groups - only actual MinIO nodes will be processed.
Since Pigsty v3.6, the minio.yml playbook focuses on cluster installation. All removal operations have been moved to the dedicated minio-rm.yml playbook using the minio_remove role.
minio-rm.yml
Playbook minio-rm.yml removes the MinIO cluster.
minio-id: Generate minio identity parameters for removal (withany_errors_fatal- stops immediately on identity validation failure)minio_safeguard: Safety check, prevent accidental deletion (default:false)minio_pause: Pause 3 seconds, allow user to abort (Ctrl+C to cancel)minio_deregister: Remove targets from Victoria/Prometheus monitoring, clean up DNS recordsminio_svc: Stop and disable minio systemd serviceminio_data: Remove minio data directory (disable withminio_rm_data=false)minio_pkg: Uninstall minio packages (enable withminio_rm_pkg=true)
- The playbook automatically skips hosts without
minio_seqdefined, preventing accidental operations on non-MinIO nodes - Identity validation uses
any_errors_fatal- the playbook stops immediately upon detecting invalid MinIO identity - A 3-second pause before removal gives users a chance to abort the operation
The removal playbook uses the minio_remove role with the following configurable parameters:
minio_safeguard: Prevents accidental deletion when set totrueminio_rm_data: Controls whether MinIO data is deleted (default:true)minio_rm_pkg: Controls whether MinIO packages are uninstalled (default:false)
Cheatsheet
Common MINIO playbook commands:
./minio.yml -l <cls> # Install MINIO module on group <cls>
./minio.yml -l minio -t minio_install # Install MinIO service, prepare data dirs, without configure & launch
./minio.yml -l minio -t minio_config # Reconfigure MinIO cluster
./minio.yml -l minio -t minio_launch # Restart MinIO cluster
./minio.yml -l minio -t minio_provision # Re-run provisioning (create buckets and users)
./minio-rm.yml -l minio # Remove MinIO cluster (using dedicated removal playbook)
./minio-rm.yml -l minio -e minio_rm_data=false # Remove cluster but preserve data
./minio-rm.yml -l minio -e minio_rm_pkg=true # Remove cluster and uninstall packages
Safeguard
To prevent accidental deletion, Pigsty’s MINIO module provides a safeguard mechanism controlled by the minio_safeguard parameter.
By default, minio_safeguard is false, allowing removal operations. If you want to protect the MinIO cluster from accidental deletion, enable this safeguard in the config inventory:
minio_safeguard: true # When enabled, minio-rm.yml will refuse to execute
If you need to remove a protected cluster, override with command-line parameters:
./minio-rm.yml -l minio -e minio_safeguard=false
Demo
Feedback
Was this page helpful?
Thanks for the feedback! Please let us know how we can improve.
Sorry to hear that. Please let us know how we can improve.