Containerized Ansible role for automated MinIO server initialization and configuration.
- Automated MinIO server configuration using Ansible
- User and access key management
- Bucket creation and configuration
- Runs in a containerized environment
- Uses official MinIO client (mc) for operations
- Docker
- MinIO server instance
- Network connectivity to MinIO server
-
Build the container:
docker build -t minio-init .
-
Run with required environment variables:
docker run -e MINIO_ENDPOINT=your-minio-server \ -e MINIO_ACCESS_KEY=your-access-key \ -e MINIO_SECRET_KEY=your-secret-key \ minio-init
The role behavior can be customized through Ansible variables. Create a configuration file and mount it when running the container:
# config.yml example
minio_users:
- name: service1
access_key: access1
secret_key: secret1
minio_buckets:
- name: data-bucket
access: private
Then run with your config:
docker run -v $(pwd)/config.yml:/config/config.yml \
-e MINIO_ENDPOINT=your-minio-server \
-e MINIO_ACCESS_KEY=your-access-key \
-e MINIO_SECRET_KEY=your-secret-key \
minio-init --extra-vars @/config/config.yml
Variable | Description | Required |
---|---|---|
MINIO_ENDPOINT | MinIO server address | Yes |
MINIO_ACCESS_KEY | Admin access key | Yes |
MINIO_SECRET_KEY | Admin secret key | Yes |
To run the playbook with the test configuration:
docker compose -f docker-compose.test.yml up sut --build
Licensed under the Apache License, Version 2.0. See LICENSE for the full license text.