feat: initial commit
This commit is contained in:
commit
a3f14e61d5
7 changed files with 93 additions and 0 deletions
1
.gitignore
vendored
Normal file
1
.gitignore
vendored
Normal file
|
|
@ -0,0 +1 @@
|
|||
.ansible
|
||||
12
meta/main.yaml
Normal file
12
meta/main.yaml
Normal file
|
|
@ -0,0 +1,12 @@
|
|||
---
|
||||
|
||||
galaxy_info:
|
||||
author: "siempie"
|
||||
description: "install and configure rustfs server"
|
||||
license: "MIT"
|
||||
role_name: "rustfs"
|
||||
dependencies:
|
||||
- name: "docker"
|
||||
src: "https://gitlab.simoncor.net/ansible/ans-docker.git"
|
||||
scm: "git"
|
||||
version: "main"
|
||||
3
readme.md
Normal file
3
readme.md
Normal file
|
|
@ -0,0 +1,3 @@
|
|||
# Ansible Role: RustFS
|
||||
|
||||
Install and configure [RustFS](https://github.com/your-rustfs-repo) - a filesystem service.
|
||||
4
renovate.json
Normal file
4
renovate.json
Normal file
|
|
@ -0,0 +1,4 @@
|
|||
{
|
||||
"$schema": "https://docs.renovatebot.com/renovate-schema.json",
|
||||
"extends": [ "local>cicd/renovate:ansible" ]
|
||||
}
|
||||
14
tasks/cleanup.yaml
Normal file
14
tasks/cleanup.yaml
Normal file
|
|
@ -0,0 +1,14 @@
|
|||
---
|
||||
|
||||
# cleanup
|
||||
- name: "docker - prune all"
|
||||
community.docker.docker_prune:
|
||||
containers: true
|
||||
images: true
|
||||
networks: true
|
||||
volumes: true
|
||||
builder_cache: true
|
||||
|
||||
- name: "docker - force prune"
|
||||
ansible.builtin.command: "docker system prune --all --force --volumes"
|
||||
changed_when: false
|
||||
9
tasks/main.yaml
Normal file
9
tasks/main.yaml
Normal file
|
|
@ -0,0 +1,9 @@
|
|||
---
|
||||
|
||||
# install rustfs
|
||||
- name: "install rustfs"
|
||||
ansible.builtin.import_tasks: "rustfs.yaml"
|
||||
|
||||
# cleanup docker
|
||||
- name: "cleanup docker"
|
||||
ansible.builtin.import_tasks: "cleanup.yaml"
|
||||
50
tasks/rustfs.yaml
Normal file
50
tasks/rustfs.yaml
Normal file
|
|
@ -0,0 +1,50 @@
|
|||
---
|
||||
|
||||
# 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 }}"
|
||||
Loading…
Add table
Add a link
Reference in a new issue