Robert Kaussow
3d736acfbd
All checks were successful
continuous-integration/drone/push Build is passing
35 lines
912 B
YAML
35 lines
912 B
YAML
---
|
|
- 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
|