Add remote docker volumes (using rclone)
This commit is contained in:
parent
f20b2596d0
commit
a2c680f3e8
6 changed files with 39 additions and 5 deletions
|
@ -22,6 +22,9 @@ class FilterModule(object):
|
||||||
if location["type"] == "docker":
|
if location["type"] == "docker":
|
||||||
new_location["from"] = name
|
new_location["from"] = name
|
||||||
new_location["type"] = "volume"
|
new_location["type"] = "volume"
|
||||||
|
if location["type"] == "docker_remote":
|
||||||
|
new_location["from"] = name
|
||||||
|
new_location["type"] = "volume"
|
||||||
|
|
||||||
if location["type"] == "hook":
|
if location["type"] == "hook":
|
||||||
backup_dir = f"/opt/services/_backup/{name}"
|
backup_dir = f"/opt/services/_backup/{name}"
|
||||||
|
|
|
@ -68,6 +68,6 @@ immich_compose:
|
||||||
default:
|
default:
|
||||||
|
|
||||||
volumes:
|
volumes:
|
||||||
upload:
|
upload: "{{ vault_immich.upload_volume_driver }}"
|
||||||
pgdata:
|
pgdata:
|
||||||
model-cache:
|
model-cache:
|
||||||
|
|
|
@ -23,4 +23,4 @@ jellyfin_compose:
|
||||||
volumes:
|
volumes:
|
||||||
config:
|
config:
|
||||||
cache:
|
cache:
|
||||||
media:
|
media: "{{ vault_jellyfin.media_volume_driver }}"
|
||||||
|
|
29
playbooks/roles/software/tasks/docker-rclone-plugin.yml
Normal file
29
playbooks/roles/software/tasks/docker-rclone-plugin.yml
Normal file
|
@ -0,0 +1,29 @@
|
||||||
|
- name: Install fuse system packages
|
||||||
|
ansible.builtin.apt:
|
||||||
|
pkg:
|
||||||
|
- fuse
|
||||||
|
state: present
|
||||||
|
update_cache: true
|
||||||
|
become: true
|
||||||
|
|
||||||
|
- name: Create the rclone plugin config dir
|
||||||
|
ansible.builtin.file:
|
||||||
|
path: "/var/lib/docker-plugins/rclone/config"
|
||||||
|
state: directory
|
||||||
|
mode: "0755"
|
||||||
|
become: true
|
||||||
|
|
||||||
|
- name: Create the rclone plugin cache dir
|
||||||
|
ansible.builtin.file:
|
||||||
|
path: "/var/lib/docker-plugins/rclone/cache"
|
||||||
|
state: directory
|
||||||
|
mode: "0755"
|
||||||
|
become: true
|
||||||
|
|
||||||
|
- name: Install rclone plugin
|
||||||
|
community.docker.docker_plugin:
|
||||||
|
alias: rclone
|
||||||
|
plugin_name: rclone/docker-volume-rclone:amd64
|
||||||
|
plugin_options:
|
||||||
|
args: "-v"
|
||||||
|
state: enable
|
|
@ -7,6 +7,8 @@
|
||||||
|
|
||||||
- name: Install docker
|
- name: Install docker
|
||||||
ansible.builtin.import_tasks: docker.yml
|
ansible.builtin.import_tasks: docker.yml
|
||||||
|
- name: Install docker rclone plugin
|
||||||
|
ansible.builtin.import_tasks: docker-rclone-plugin.yml
|
||||||
|
|
||||||
- name: Install jq and bzip2
|
- name: Install jq and bzip2
|
||||||
ansible.builtin.apt:
|
ansible.builtin.apt:
|
||||||
|
|
|
@ -184,7 +184,7 @@ services = {
|
||||||
backup = [
|
backup = [
|
||||||
{
|
{
|
||||||
name = "immich_upload"
|
name = "immich_upload"
|
||||||
type = "docker"
|
type = "docker_remote"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
name = "immich_database"
|
name = "immich_database"
|
||||||
|
@ -223,7 +223,7 @@ services = {
|
||||||
},
|
},
|
||||||
|
|
||||||
"jellyfin" = {
|
"jellyfin" = {
|
||||||
host = "node002"
|
host = "node001"
|
||||||
dns = [{
|
dns = [{
|
||||||
domain = "media.serguzim.me"
|
domain = "media.serguzim.me"
|
||||||
}]
|
}]
|
||||||
|
@ -234,7 +234,7 @@ services = {
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
name = "jellyfin_media"
|
name = "jellyfin_media"
|
||||||
type = "docker"
|
type = "docker_remote"
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
monitoring = {
|
monitoring = {
|
||||||
|
|
Loading…
Reference in a new issue