This commit is contained in:
parent
206b1e4d53
commit
d1cd0b73d1
@ -31,3 +31,17 @@ minio_access_key: "demo"
|
||||
|
||||
# @var minio_secret_key:description: Minio secret key (should be changed for prod environments)
|
||||
minio_secret_key: "passphrase"
|
||||
|
||||
minio_cronjobs: []
|
||||
# @var minio_cronjobs:example: >
|
||||
# minio_cronjobs:
|
||||
# - name: maintenance
|
||||
# minute: "0"
|
||||
# hour: "0"
|
||||
# day: "*"
|
||||
# month: "*"
|
||||
# weekday: "*"
|
||||
# job: "mc rm --older-than 30d --recursive --force my_bucket/logs"
|
||||
# user: "{{ minio_user }}"
|
||||
# cron_file: "minio"
|
||||
# @end
|
||||
|
@ -25,15 +25,28 @@
|
||||
become: True
|
||||
become_user: "{{ minio_user }}"
|
||||
|
||||
- name: Download Minio client
|
||||
get_url:
|
||||
url: "{{ __minio_client_source }}{{ '/' + minio_client_version if minio_client_version != 'latest' else '/mc' }}"
|
||||
dest: "/usr/local/bin/mc"
|
||||
mode: 0755
|
||||
become: True
|
||||
become_user: root
|
||||
|
||||
- block:
|
||||
- name: Download Minio client
|
||||
get_url:
|
||||
url: "{{ __minio_client_source }}{{ '/' + minio_client_version if minio_client_version != 'latest' else '/mc' }}"
|
||||
dest: "/usr/local/bin/mc"
|
||||
mode: 0755
|
||||
|
||||
- name: Create cronjobs
|
||||
cron:
|
||||
name: "{{ item.name }}"
|
||||
minute: "{{ item.minute | default('*') }}"
|
||||
hour: "{{ item.hour | default('*') }}"
|
||||
day: "{{ item.day | default('*') }}"
|
||||
month: "{{ item.month | default('*') }}"
|
||||
weekday: "{{ item.weekday | default('*') }}"
|
||||
job: "{{ item.job }}"
|
||||
user: "{{ item.user | default(omit) }}"
|
||||
cron_file: "{{ item.cron_file | default(omit) }}"
|
||||
loop: "{{ minio_cronjobs }}"
|
||||
loop_control:
|
||||
label: "{{ item.name }}"
|
||||
|
||||
- name: Copy sysconfig file
|
||||
template:
|
||||
src: "etc/sysconfig/minio.j2"
|
||||
|
Loading…
Reference in New Issue
Block a user