xoxys.minio/tasks/prepare.yml

35 lines
912 B
YAML
Raw Normal View History

2020-05-19 08:18:29 +00:00
---
- block:
- name: Stat minio-latest
stat:
path: "{{ minio_base_dir }}/minio-latest"
register: minio_installed
- name: Get running version
shell: "{{ minio_base_dir }}/minio-latest -v | sed -nre 's/^[^0-9]*(([0-9]+\\.)*[0-9]+(-\\S*)).*/\\1/p'"
register: minio_current
changed_when: False
when: minio_installed.stat.exists
- name: Create group '{{ minio_group }}'
group:
name: "{{ minio_group }}"
state: present
- name: Create user '{{ minio_user }}'
user:
comment: minio
name: "{{ minio_user }}"
home: "{{ minio_user_home }}"
group: "{{ minio_group }}"
groups: "{{ minio_extra_groups | join(',') }}"
- name: Install dependencies
package:
name: "{{ item }}"
state: present
loop:
- "{{ minio_packages }}"
become: True
become_user: root