fhemberger / ansible-module-s3-minio-bucket

A custom module that allows you to manage MinIO S3 buckets via Ansible.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

ansible-module-minio-bucket

ansible-module-minio-bucket is a custom Ansible module allowing you to create and delete MinIO S3 buckets. It is roughly similar to s3_bucket and aws_s3, but it supports MinIO bucket policies.

Getting started

Requirements

The below requirements are needed on the host that execute this module.

  • minio for Python.

Installing

The "Ansible role" way

  • Clone this repository to your Ansible role_path, or install via ansible-galaxy;
    ansible-galaxy install alexisfacques.ansible_module_minio_bucket
  • Import the role in your playbooks before running any role or task that require the minio_bucket module:
    - hosts: all
      roles:
        - alexisfacques.ansible_module_minio_bucket
      tasks:
        - minio_bucket:
            ...

The "Ansible library" way

Alternatively, if importing a role is too much of a hassle, you can store this module in the library directory defined in your ansible.cfg file (Default is a sub-directory called library in the directory that contains your playbooks):

[defaults]
library = /path/to/your/library

Usage

Parameters

Parameter Choices/Defaults Comments
s3_url
- string / required
S3 URL endpoint.
name
- string / required
Name of the S3 bucket.
access_key
- string / required
MinIO S3 access key.
secret_key
- string / required
MinIO S3 secret key.
state
Choices:
present / absent
Create or remove the S3 bucket.
policy
Choices:
private (leave empty) / read-only / write-only / read-write
MinIO S3 bucket policy.
validate_certs
boolean /
Choices:
yes / no
When set to "no", SSL certificates will not be validated for boto versions >= 2.6.0.

Example of use

Examples of use can be found here.

License

This project is licensed under the MIT License - see the LICENSE file for details.

About

A custom module that allows you to manage MinIO S3 buckets via Ansible.

License:MIT License


Languages

Language:Python 100.0%