Move all data but Emby storage to SSD storage
This commit is contained in:
parent
14f91b4b3d
commit
3391dfa41c
|
@ -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"
|
||||||
|
|
|
@ -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
|
||||||
|
|
|
@ -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
|
||||||
|
|
|
@ -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
|
||||||
|
|
Reference in a new issue