Add drive mounting to media server playbook

This commit is contained in:
Ryan Goodwin 2022-06-17 16:23:25 -04:00
parent 7d49c21c62
commit aab9c8d082
4 changed files with 29 additions and 2 deletions

View File

@ -4,7 +4,7 @@
apt: apt:
name: name:
- qemu-guest-agent - qemu-guest-agent
update_cache: yes update_cache: true
state: present state: present
- include_tasks: docker.yml - include_tasks: docker.yml

View File

@ -21,6 +21,8 @@
- "LOCAL_NETWORK: 192.168.0.0/24" - "LOCAL_NETWORK: 192.168.0.0/24"
volumes: volumes:
- "{{ CONFIG_FOLDER }}/transmission/data:/data" - "{{ CONFIG_FOLDER }}/transmission/data:/data"
ports:
- 9091:9091
capabilities: capabilities:
- NET_ADMIN - NET_ADMIN

View File

@ -1,2 +1,4 @@
--- ---
# handlers file for media - name: Manual Share Mount
become: true
command: "sudo mount -a"

View File

@ -1,4 +1,27 @@
--- ---
- name: Install cifs-utils
package:
name:
- cifs-utils
update_cache: true
state: present
- name: Add media drive to fstab
linesinfile:
state: present
path: "/etc/fstab"
line: "UUID=<SET_THIS_VALUE> /mnt/content auto defaults 0 0"
notify:
- Manual Share Mount
- name: Add downloads drive to fstab
linesinfile:
state: present
path: "/etc/fstab"
line: "//192.168.0.39/torrents /mnt/downloads cifs vers=3.0,credentials=/home/{{ username }}/.sharelogin,iocharset=utf8,file_mode=0777,dir_mode=0777,uid={{ username }},gid={{ username }},nofail 0 0"
notify:
- Manual Share Mount
- name: Deploy Plex - name: Deploy Plex
community.docker.docker_container: community.docker.docker_container:
name: plex name: plex