forked from atosatto/ansible-minio
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add variables to allow for rpm deployments
- Loading branch information
Showing
4 changed files
with
98 additions
and
57 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,32 +1,46 @@ | ||
--- | ||
|
||
- name: Compose the Minio client download base url | ||
set_fact: | ||
_minio_client_download_base_url: "https://dl.minio.io/client/mc/release/linux-{{ go_arch }}" | ||
|
||
- name: Compose the Minio client download url with lastest release | ||
set_fact: | ||
_minio_client_download_url: "{{ _minio_client_download_base_url }}/mc" | ||
when: minio_client_release | length == 0 | ||
|
||
- name: "Compose the Minio client download url with release {{ minio_client_release }}" | ||
set_fact: | ||
_minio_client_download_url: "{{ _minio_client_download_base_url }}/archive/mc.{{ minio_client_release }}" | ||
when: minio_client_release | length > 0 | ||
|
||
- name: "Get the Minio client checksum for {{ go_arch }} architecture" | ||
set_fact: | ||
_minio_client_checksum: "{{ lookup('url', _minio_client_download_url + '.sha256sum').split(' ')[0] }}" | ||
|
||
- name: Download the Minio client | ||
get_url: | ||
url: "{{ _minio_client_download_url }}" | ||
dest: "{{ minio_client_bin }}" | ||
owner: "root" | ||
group: "root" | ||
mode: 0755 | ||
checksum: "sha256:{{ _minio_client_checksum }}" | ||
register: _download_client | ||
until: _download_client is succeeded | ||
retries: 5 | ||
delay: 2 | ||
- name: "Install the Minio client from binaries" | ||
block: | ||
|
||
- name: Compose the Minio client download base url | ||
set_fact: | ||
_minio_client_download_base_url: "https://dl.minio.io/client/mc/release/linux-{{ go_arch }}" | ||
|
||
- name: Compose the Minio client download url with lastest release | ||
set_fact: | ||
_minio_client_download_url: "{{ _minio_client_download_base_url }}/mc" | ||
when: minio_client_release | length == 0 | ||
|
||
- name: "Compose the Minio client download url with release {{ minio_client_release }}" | ||
set_fact: | ||
_minio_client_download_url: "{{ _minio_client_download_base_url }}/archive/mc.{{ minio_client_release }}" | ||
when: minio_client_release | length > 0 | ||
|
||
- name: "Get the Minio client checksum for {{ go_arch }} architecture" | ||
set_fact: | ||
_minio_client_checksum: "{{ lookup('url', _minio_client_download_url + '.sha256sum').split(' ')[0] }}" | ||
|
||
- name: Download the Minio client | ||
get_url: | ||
url: "{{ _minio_client_download_url }}" | ||
dest: "{{ minio_client_bin }}" | ||
owner: "root" | ||
group: "root" | ||
mode: 0755 | ||
checksum: "sha256:{{ _minio_client_checksum }}" | ||
register: _download_client | ||
until: _download_client is succeeded | ||
retries: 5 | ||
delay: 2 | ||
when: | ||
- not (minio_client_install_rpm|length > 0) | ||
|
||
|
||
- name: "Install Minio client from rpm" | ||
yum: | ||
name: "{{ minio_client_install_rpm }}" | ||
disable_gpg_check: "{{ not minio_rpm_gpg_check_enabled|bool }}" | ||
state: "present" | ||
when: | ||
- minio_client_install_rpm|length > 0 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,33 +1,47 @@ | ||
--- | ||
- name: Compose the Minio server download base url | ||
set_fact: | ||
_minio_server_download_base_url: "https://dl.minio.io/server/minio/release/linux-{{ go_arch }}" | ||
|
||
- name: Compose the Minio server download url with lastest release | ||
set_fact: | ||
_minio_server_download_url: "{{ _minio_server_download_base_url }}/minio" | ||
when: minio_server_release | length == 0 | ||
- name: "Install Minio server from binaries" | ||
block: | ||
- name: Compose the Minio server download base url | ||
set_fact: | ||
_minio_server_download_base_url: "https://dl.minio.io/server/minio/release/linux-{{ go_arch }}" | ||
|
||
- name: "Compose the Minio server download url with release {{ minio_server_release }}" | ||
set_fact: | ||
_minio_server_download_url: "{{ _minio_server_download_base_url }}/archive/minio.{{ minio_server_release }}" | ||
when: minio_server_release | length > 0 | ||
- name: Compose the Minio server download url with lastest release | ||
set_fact: | ||
_minio_server_download_url: "{{ _minio_server_download_base_url }}/minio" | ||
when: minio_server_release | length == 0 | ||
|
||
- name: "Get the Minio server checksum for {{ go_arch }} architecture" | ||
set_fact: | ||
_minio_server_checksum: "{{ lookup('url', _minio_server_download_url + '.sha256sum').split(' ')[0] }}" | ||
- name: "Compose the Minio server download url with release {{ minio_server_release }}" | ||
set_fact: | ||
_minio_server_download_url: "{{ _minio_server_download_base_url }}/archive/minio.{{ minio_server_release }}" | ||
when: minio_server_release | length > 0 | ||
|
||
- name: Download the Minio server | ||
get_url: | ||
url: "{{ _minio_server_download_url }}" | ||
dest: "{{ minio_server_bin }}" | ||
owner: "root" | ||
group: "root" | ||
mode: 0755 | ||
checksum: "sha256:{{ _minio_server_checksum }}" | ||
register: _download_server | ||
until: _download_server is succeeded | ||
retries: 5 | ||
delay: 2 | ||
notify: restart minio | ||
- name: "Get the Minio server checksum for {{ go_arch }} architecture" | ||
set_fact: | ||
_minio_server_checksum: "{{ lookup('url', _minio_server_download_url + '.sha256sum').split(' ')[0] }}" | ||
|
||
- name: Download the Minio server | ||
get_url: | ||
url: "{{ _minio_server_download_url }}" | ||
dest: "{{ minio_server_bin }}" | ||
owner: "root" | ||
group: "root" | ||
mode: 0755 | ||
checksum: "sha256:{{ _minio_server_checksum }}" | ||
register: _download_server | ||
until: _download_server is succeeded | ||
retries: 5 | ||
delay: 2 | ||
notify: restart minio | ||
|
||
when: | ||
- not (minio_server_install_rpm|length > 0) | ||
|
||
- name: "Install Minio server from rpm" | ||
yum: | ||
name: "{{ minio_server_install_rpm }}" | ||
disable_gpg_check: "{{ not minio_rpm_gpg_check_enabled|bool }}" | ||
state: "present" | ||
notify: restart minio | ||
when: | ||
- minio_server_install_rpm|length > 0 |