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

View file

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

View file

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

View file

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