diff --git a/defaults/main.yml b/defaults/main.yml index 60a753f..7a39f52 100644 --- a/defaults/main.yml +++ b/defaults/main.yml @@ -39,3 +39,6 @@ minio_secret_key: "" # Switches to enable/disable the Minio server and/or Minio client installation. minio_install_server: true minio_install_client: true + +# Switches Minio installation source: allowed is one of ['download', 'repo'] +minio_install_source: download \ No newline at end of file diff --git a/tasks/install-client.yml b/tasks/install-client.yml index c95f7b4..dc1e533 100644 --- a/tasks/install-client.yml +++ b/tasks/install-client.yml @@ -28,5 +28,13 @@ checksum: "sha256:{{ _minio_client_checksum }}" register: _download_client until: _download_client is succeeded + when: minio_install_source == "download" retries: 5 delay: 2 + +- name: Install the latest version of Minio from a repository + ansible.builtin.package: + name: + - mcli + state: latest + when: minio_install_source == "repo" \ No newline at end of file diff --git a/tasks/install-server.yml b/tasks/install-server.yml index 6214efa..90af09a 100644 --- a/tasks/install-server.yml +++ b/tasks/install-server.yml @@ -49,10 +49,18 @@ checksum: "sha256:{{ _minio_server_checksum }}" register: _download_server until: _download_server is succeeded + when: minio_install_source == "download" retries: 5 delay: 2 notify: restart minio +- name: Install the latest version of Minio server from a repository + ansible.builtin.package: + name: + - minio + state: latest + when: minio_install_source == "repo" + - name: Generate the Minio server envfile template: src: minio.env.j2