Move all data but Emby storage to SSD storage

This commit is contained in:
Sam A. 2023-06-27 12:44:10 +02:00
parent 14f91b4b3d
commit 3391dfa41c
Signed by: samsapti
GPG key ID: CBBBE7371E81C4EA
4 changed files with 28 additions and 18 deletions

View file

@ -1,7 +1,8 @@
# vim: ft=yaml.ansible
---
base_domain: sapti.me
base_volume: "{{ hdd_mount_point }}/apps"
base_volume: "{{ ssd_mount_point }}/apps"
mass_data_volume: "{{ hdd_mount_point }}/apps"
services:
caddy:
@ -17,10 +18,12 @@ services:
emby:
domain: watch.{{ base_domain }}
volume: "{{ base_volume }}/emby"
data_volume: "{{ mass_data_volume }}/emby"
version: latest
monerod:
domain: xmr.{{ base_domain }}
volume: "{{ base_volume }}/monerod"
version: latest
nextcloud:
@ -57,7 +60,7 @@ sender_domains:
backup_volumes:
- "{{ services.caddy.volume }}:/mnt/volumes/caddy:ro"
- "{{ services.postfix.volume }}:/mnt/volumes/postfix:ro"
- "{{ services.emby.volume }}/programdata:/mnt/volumes/emby/programdata:ro"
- "{{ services.emby.volume }}:/mnt/volumes/emby:ro"
- "{{ services.nextcloud.volume }}:/mnt/volumes/nextcloud:ro"
- "{{ services.pihole.volume }}:/mnt/volumes/pi-hole:ro"
- "{{ services.wireguard.volume }}:/mnt/volumes/wireguard:ro"

View file

@ -16,12 +16,17 @@
gateway: 172.18.0.1
state: present
- name: Create base directory for Docker volumes
- name: Create base directories for Docker volumes
ansible.builtin.file:
name: "{{ base_volume }}"
name: "{{ volume }}"
owner: root
mode: u=rwx,g=rx,o=rx
state: directory
loop:
- "{{ base_volume }}"
- "{{ mass_data_volume }}"
loop_control:
loop_var: volume
- name: Deploy services
ansible.builtin.include_tasks: services/{{ item.key }}.yml

View file

@ -2,20 +2,20 @@
---
- name: Create Emby volume directories
ansible.builtin.file:
name: "{{ services.emby.volume }}/{{ dir }}"
owner: "{{ ansible_user }}"
name: "{{ dir }}"
owner: '1000'
mode: u=rwx,g=rx,o=rx
state: directory
loop:
- programdata
- tvshows
- movies
- "{{ services.emby.volume }}/programdata"
- "{{ services.emby.data_volume }}/tvshows"
- "{{ services.emby.data_volume }}/movies"
loop_control:
loop_var: dir
- name: Deploy Emby Docker container
community.docker.docker_container:
name: emby_app
name: emby
state: "{{ 'absent' if stop is defined and stop else 'started' }}"
restart: "{{ stop is undefined or not stop }}"
image: emby/embyserver_arm64v8:{{ services.emby.version }}
@ -29,7 +29,7 @@
- emby
volumes:
- "{{ services.emby.volume }}/programdata:/config:rw"
- "{{ services.emby.volume }}/tvshows:/mnt/share1:rw"
- "{{ services.emby.volume }}/movies:/mnt/share2:rw"
- "{{ services.emby.data_volume }}/tvshows:/mnt/share1:rw"
- "{{ services.emby.data_volume }}/movies:/mnt/share2:rw"
devices:
- /dev/vchiq:/dev/vchiq # MMAL/OMX on Raspberry Pi

View file

@ -1,13 +1,15 @@
# vim: ft=yaml.ansible
---
- name: Create Docker volume for Monero blockchain data
community.docker.docker_volume:
volume_name: monerod-node-blockchain
state: present
- name: Create Monero node volume directory
ansible.builtin.file:
name: "{{ services.monerod.volume }}"
owner: '1000'
mode: u=rwx,g=rx,o=rx
state: directory
- name: Deploy Monero node Docker container
community.docker.docker_container:
name: monerod_node
name: monerod
state: "{{ 'absent' if stop is defined and stop else 'started' }}"
restart: "{{ stop is undefined or not stop }}"
image: sethsimmons/simple-monerod:{{ services.monerod.version }}
@ -18,6 +20,6 @@
aliases:
- monerod
volumes:
- monerod-node-blockchain:/home/monero/.bitmonero:rw
- "{{ services.monerod.volume }}:/home/monero/.bitmonero:rw"
published_ports:
- 18080:18080/tcp