mirror of
https://github.com/atosatto/ansible-minio.git
synced 2024-12-11 14:18:32 +01:00
341e3003a8
Create data directories automatically. * Add flag to disable automatic creation.
46 lines
1.0 KiB
YAML
46 lines
1.0 KiB
YAML
---
|
|
|
|
- name: download minio server
|
|
get_url:
|
|
url: "{{ minio_server_download_url }}"
|
|
dest: "{{ minio_server_bin }}"
|
|
owner: "{{ minio_user }}"
|
|
group: "{{ minio_group }}"
|
|
mode: 0755
|
|
|
|
- name: generate the minio server envfile
|
|
template:
|
|
src: minio.env.j2
|
|
dest: "{{ minio_server_envfile }}"
|
|
notify: restart minio
|
|
|
|
- name: create the minio server systemd config
|
|
template:
|
|
src: minio.service.j2
|
|
dest: "{{ systemd_units_dir }}/minio.service"
|
|
when: ansible_service_mgr == "systemd"
|
|
|
|
- name: create the minio server init.d config
|
|
template:
|
|
src: minio.init.j2
|
|
dest: "{{ initd_conf_dir }}/minio"
|
|
mode: 0750
|
|
when: ansible_service_mgr != "systemd"
|
|
|
|
- name: create data storage directories
|
|
file:
|
|
path: "{{ item }}"
|
|
state: directory
|
|
recurse: true
|
|
owner: "{{ minio_user }}"
|
|
group: "{{ minio_group }}"
|
|
mode: 0750
|
|
when: minio_server_make_datadirs
|
|
with_items: "{{ minio_server_datadirs }}"
|
|
|
|
- name: enable and start the minio service
|
|
service:
|
|
name: minio
|
|
state: started
|
|
enabled: yes
|