Merge 92bc38b5f9
into 15ad3a3604
This commit is contained in:
commit
6725be21c6
|
@ -7,6 +7,8 @@
|
|||
- ansible_python_version is version_compare('2.6.0', '>=')
|
||||
- ansible_python_version is version_compare('2.7.9', '<')
|
||||
|
||||
- import_tasks: preflight.yml
|
||||
|
||||
- include_tasks: install-server.yml
|
||||
when: minio_install_server
|
||||
|
||||
|
|
|
@ -0,0 +1,26 @@
|
|||
---
|
||||
- name: Validate access key
|
||||
fail:
|
||||
msg: "minio_access_key is set but must be at least three characters"
|
||||
when: minio_access_key|length < 3 and minio_access_key|length != 0
|
||||
|
||||
- name: Validate secret key
|
||||
fail:
|
||||
msg: "minio_secret_key is set but must be at least 8 characters"
|
||||
when: minio_secret_key|length < 8 and minio_secret_key|length != 0
|
||||
|
||||
- name: Setup __minio_volumes (cluster context)
|
||||
set_fact:
|
||||
__minio_volumes: "{{ minio_server_cluster_nodes | join(' ') }}"
|
||||
when:
|
||||
minio_server_cluster_nodes|length > 0
|
||||
|
||||
- name: Setup __minio_volumes (single node)
|
||||
set_fact:
|
||||
__minio_volumes: "{{ minio_server_datadirs | join(' ') }}"
|
||||
when: minio_server_datadirs|length > 0 and minio_server_cluster_nodes|length == 0
|
||||
|
||||
- name: Validate __minio_volumes
|
||||
fail:
|
||||
msg: "Please set minio_server_cluster_nodes or minio_server_datadirs"
|
||||
when: __minio_volumes|length == 0
|
|
@ -1,11 +1,8 @@
|
|||
{{ ansible_managed | comment }}
|
||||
|
||||
# Minio local/remote volumes.
|
||||
{% if minio_server_cluster_nodes | length > 0 %}
|
||||
MINIO_VOLUMES="{{ minio_server_cluster_nodes | join(' ') }}"
|
||||
{% else %}
|
||||
MINIO_VOLUMES="{{ minio_server_datadirs | join(' ') }}"
|
||||
{% endif %}
|
||||
MINIO_VOLUMES="{{ __minio_volumes }}"
|
||||
|
||||
# Minio cli options.
|
||||
MINIO_OPTS="--address {{ minio_server_addr }} {{ minio_server_opts }}"
|
||||
|
||||
|
|
|
@ -20,7 +20,7 @@ Group={{ minio_group }}
|
|||
PermissionsStartOnly=true
|
||||
|
||||
EnvironmentFile={{ minio_server_envfile }}
|
||||
ExecStartPre=/bin/bash -c "[ -n \"${MINIO_VOLUMES}\" ] || echo \"Variable MINIO_VOLUMES not set in {{ minio_server_envfile }}\""
|
||||
#ExecStartPre=/bin/bash -c "[ -n \"${MINIO_VOLUMES}\" ] || echo \"Variable MINIO_VOLUMES not set in {{ minio_server_envfile }}\""
|
||||
|
||||
ExecStart={{ minio_server_bin }} server $MINIO_OPTS $MINIO_VOLUMES
|
||||
|
||||
|
|
Loading…
Reference in New Issue