s3/tasks/rustfs.yaml

50 lines
956 B
YAML

---
# create directories
- name: "create rustfs directories"
ansible.builtin.file:
path: "{{ item }}"
state: "directory"
mode: "0755"
loop:
- "/mnt/rustfs/data"
# run rustfs
- name: "run rustfs"
community.docker.docker_container:
# docker defaults
auto_remove: "no"
container_default_behavior: "no_defaults"
detach: "yes"
init: "no"
interactive: "no"
log_driver: "json-file"
log_options:
max-size: "10m"
max-file: "3"
memory: "0"
paused: "no"
privileged: "no"
pull: "always"
read_only: "no"
state: "started"
tty: "no"
# rustfs
name: "rustfs"
image: "docker.io/fosrl/rustfs:1.0.0-alpha.97"
image_name_mismatch: "recreate"
restart_policy: "unless-stopped"
network_mode: "host"
volumes:
- "/mnt/rustfs/data:/data"
ports:
- "9000:9000/tcp"
- "9001:9001/tcp"
env:
# global
TZ: "{{ timezone }}"