old stuff

This commit is contained in:
Ryan Goodwin 2024-09-15 23:45:08 -04:00
parent 404e6a8009
commit 962300402d
7 changed files with 24 additions and 151 deletions

View File

@ -1,6 +1,6 @@
galaxy_info:
author: your name
description: your role description
author: Ryan Goodwin
description: Install home service
company: your company (optional)
# If the issue tracker for your role is not on github, uncomment the
@ -16,7 +16,7 @@ galaxy_info:
# - CC-BY-4.0
license: license (GPL-2.0-or-later, MIT, etc)
min_ansible_version: 2.1
min_ansible_version: "2.1"
# If this a Container Enabled role, provide the minimum Ansible Container version.
# min_ansible_container_version:
@ -26,18 +26,8 @@ galaxy_info:
# If you don't wish to enumerate all versions for a particular platform, use 'all'.
# To view available platforms and versions (or releases), visit:
# https://galaxy.ansible.com/api/v1/platforms/
#
# platforms:
# - name: Fedora
# versions:
# - all
# - 25
# - name: SomePlatform
# versions:
# - all
# - 1.0
# - 7
# - 99.99
platforms:
- name: Ubuntu
galaxy_tags: []
# List tags for your role here, one per line. A tag is a keyword that describes

View File

@ -14,11 +14,11 @@
restart_policy: unless-stopped
env:
- "TZ={{ TZ }}"
- "OPENVPN_PROVIDER: PIA"
- "OPENVPN_CONFIG: ca_toronto"
- "OPENVPN_USERNAME: {{ PIA_USER }}"
- "OPENVPN_PASSWORD: {{ PIA_PASS }}"
- "LOCAL_NETWORK: 192.168.0.0/24"
- OPENVPN_PROVIDER=PIA
- OPENVPN_CONFIG=ca_toronto
- "OPENVPN_USERNAME={{ PIA_USER }}"
- "OPENVPN_PASSWORD={{ PIA_PASS }}"
- LOCAL_NETWORK=192.168.0.0/24
volumes:
- "{{ CONFIG_FOLDER }}/transmission/data:/data"
ports:
@ -180,7 +180,7 @@
- "TZ={{ TZ }}"
- "PUID={{ PUID }}"
- "PGID={{ PGID }}"
- "LOG_LEVEL=INFO"
- LOG_LEVEL=INFO
volumes:
- "{{ CONFIG_FOLDER }}/overseerr/config:/config"
ports:
@ -201,6 +201,19 @@
ports:
- 4545:4545
- name: Deploy Plex
community.docker.docker_container:
name: plex
image: lscr.io/linuxserver/plex
restart_policy: always
env:
- "PUID={{ PUID }}"
- "PGID={{ PGID }}"
- VERSION=docker
volumes:
- "{{ CONFIG_FOLDER }}/plex/config:/config"
- "{{ MEDIA_FOLDER }}:/content"
# Custom TV Channels
- name: Deploy disquetv
community.docker.docker_container:

View File

@ -1,54 +0,0 @@
Media Server
============
Mount a Hard drive and a network share and Deploy Plex Media Server in a docker container.
Role Variables
--------------
| Variable | Description | Required | Default |
| ----------------- | --------------------------------------------------- | :------: | ------- |
| `TZ` | Timezone | - [ ] | `America/New_York` |
| `PUID` | User ID | - [ ] | `1000` |
| `PGID` | Group ID | - [ ] | `1000` |
| `DISK_UUID` | UUID of disk holding media | - [x] | |
| `DOWNLOAD_FOLDER` | Folder where completed torrents are downloaded | - [ ] | `/mnt/downloads` |
| `CONFIG_FOLDER` | Folder containing all persistent configuration data | - [ ] | `~/.config` |
| `MEDIA_FOLDER` | base folder for all media content | - [ ] | `/mnt/content` |
Dependencies
------------
* Docker module
Example Playbook
----------------
Required vars
```yaml
- hosts: media-servers
include_roles:
- name: media
vars:
DISK_UUID: "UUID"
```
All variables
```yaml
- hosts: media-servers
include_roles:
- name: media
vars:
DISK_UUID: "UUID"
TZ: "America/New_York"
PUID: "1000"
PGID: "1000"
DOWNLOAD_FOLDER: "/mnt/downloads"
CONFIG_FOLDER: "~/.config"
MEDIA_FOLDER: "/mnt/content"
```
License
-------
BSD

View File

@ -1,8 +0,0 @@
---
TZ: "America/New_York"
PUID: 1000
PGID: 1000
DOWNLOAD_FOLDER: "/mnt/downloads"
CONFIG_FOLDER: "~/.config/"
MEDIA_FOLDER: "/mnt/content"

View File

@ -1,4 +0,0 @@
---
- name: Manual Share Mount
become: true
command: "sudo mount -a"

View File

@ -1,28 +0,0 @@
galaxy_info:
author: Ryan Goodwin
description: Deploy container for media server
license: MIT
min_ansible_version: "2.1"
# Provide a list of supported platforms, and for each platform a list of versions.
# If you don't wish to enumerate all versions for a particular platform, use 'all'.
# To view available platforms and versions (or releases), visit:
# https://galaxy.ansible.com/api/v1/platforms/
platforms:
- name: Ubuntu
versions:
- focal
galaxy_tags: []
# List tags for your role here, one per line. A tag is a keyword that describes
# and categorizes the role. Users find roles by searching for tags. Be sure to
# remove the '[]' above, if you add tags to this list.
#
# NOTE: A tag is limited to a single word comprised of alphanumeric characters.
# Maximum 20 tags per role.
dependencies: []
# List your role dependencies here, one per line. Be sure to remove the '[]' above,
# if you add dependencies to this list.

View File

@ -1,36 +0,0 @@
---
- 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={{ DISK_UUID }} /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/{{ lookup('env', 'USER') }}/.credentials/torrentlogin,iocharset=utf8,file_mode=0777,dir_mode=0777,uid={{ lookup('env', 'USER') }},gid={{ lookup('env', 'USER') }},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"