infra-v1/applications/roles/media/tasks/main.yml

37 lines
968 B
YAML

---
- 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
community.docker.docker_container:
name: plex
image: lscr.io/linuxserver/plex
restart_policy: unless-stopped
env:
- "PUID={{ PUID }}"
- "PGID={{ PGID }}"
- "VERSION=docker"
volumes:
- "{{ CONFIG_FOLDER }}/plex/config:/config"
- "{{ MEDIA_FOLDER }}:/content"