Getting started

Default installation and upgrades

The role will install the latest MinIO Client release available by default. After that, the selected release will be "locked" via the Ansible local facts, and normal execution of the debops.mcli role will not upgrade an existing installation.

To perform an upgrade, you can use the following command:

debops run service/mcli -l <host|group> -t role::golang \
                        -e 'mcli__upstream_upgrade=true'

This command will execute the debops.golang Ansible role in the context of the service/mcli playbook and perform the upgrade of MinIO Client binary if a new release is found.

If you want to perform upgrades automatically when the role is executed when they are available, you can set the mcli__upstream_upgrade variable to True in the Ansible inventory.

The previously downloaded MinIO Client releases are currently not removed automatically, therefore make sure that you clean up the ~_golang/go/src/ directory managed by the debops.golang role from time to time.

Dependent role usage

The debops.mcli role is focused on configuration of the MinIO Client install parameters, and relies on other DebOps roles for the actual installation:

  • The debops.golang role is used to download and verify MinIO Client binary, or clone the MinIO Client source code and build the binary locally.
  • The debops.keyring role is used by the debops.golang role to fetch and import the MinIO Client GPG signing key used to verify the MinIO Client binaries or source code.

See the provided Ansible playbook for the order of the roles and usage of the dependent role variables. Without the mentioned DebOps roles and services managed by them, debops.mcli role alone will not deploy the MinIO Client correctly.

Example inventory

To configure MinIO Client on a host, it needs to be added to the [debops_service_mcli] Ansible inventory group:


Example playbook

If you are using this role without DebOps, here's an example Ansible playbook that uses the debops.mcli role:


- name: Manage MinIO Client (mcli) installation
  collections: [ 'debops.debops', 'debops.roles01',
                 'debops.roles02', 'debops.roles03' ]
  hosts: [ 'debops_service_mcli' ]
  become: True

  environment: '{{ inventory__environment | d({})
                   | combine(inventory__group_environment | d({}))
                   | combine(inventory__host_environment  | d({})) }}'


    - name: Prepare mcli environment
        name: 'mcli'
        tasks_from: 'main_env'
      tags: [ 'role::mcli', 'role::keyring', 'role::golang' ]


    - role: keyring
      tags: [ 'role::keyring', 'skip::keyring', 'role::golang' ]
      keyring__dependent_gpg_user: '{{ golang__keyring__dependent_gpg_user }}'
        - '{{ golang__keyring__dependent_gpg_keys }}'
        - '{{ mcli__golang__dependent_packages }}'

    - role: apt_preferences
      tags: [ 'role::apt_preferences', 'skip::apt_preferences' ]
        - '{{ golang__apt_preferences__dependent_list }}'

    - role: golang
      tags: [ 'role::golang', 'skip::golang' ]
        - '{{ mcli__golang__dependent_packages }}'

    - role: mcli
      tags: [ 'role::mcli', 'skip::mcli' ]

Ansible tags

You can use Ansible --tags or --skip-tags parameters to limit what tasks are performed during Ansible run. This can be used after a host was first configured to speed up playbook execution, when you are sure that most of the configuration is already in the desired state.

Available role tags:

Main role tag, should be used in the playbook to execute all of the role tasks as well as role dependencies.

Other resources

List of other useful resources related to the debops.mcli Ansible role: