From 962300402d05db9aefe9c74342f10d5f71f7760a Mon Sep 17 00:00:00 2001 From: Ryan Goodwin Date: Sun, 15 Sep 2024 23:45:08 -0400 Subject: [PATCH] old stuff --- applications/roles/home-apps/meta/main.yml | 20 ++----- .../roles/media-manager/tasks/main.yml | 25 ++++++--- applications/roles/media/README.md | 54 ------------------- applications/roles/media/defaults/main.yml | 8 --- applications/roles/media/handlers/main.yml | 4 -- applications/roles/media/meta/main.yml | 28 ---------- applications/roles/media/tasks/main.yml | 36 ------------- 7 files changed, 24 insertions(+), 151 deletions(-) delete mode 100644 applications/roles/media/README.md delete mode 100644 applications/roles/media/defaults/main.yml delete mode 100644 applications/roles/media/handlers/main.yml delete mode 100644 applications/roles/media/meta/main.yml delete mode 100644 applications/roles/media/tasks/main.yml diff --git a/applications/roles/home-apps/meta/main.yml b/applications/roles/home-apps/meta/main.yml index c572acc..ce8543f 100644 --- a/applications/roles/home-apps/meta/main.yml +++ b/applications/roles/home-apps/meta/main.yml @@ -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 diff --git a/applications/roles/media-manager/tasks/main.yml b/applications/roles/media-manager/tasks/main.yml index b13f337..08564ba 100644 --- a/applications/roles/media-manager/tasks/main.yml +++ b/applications/roles/media-manager/tasks/main.yml @@ -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: diff --git a/applications/roles/media/README.md b/applications/roles/media/README.md deleted file mode 100644 index 97218dd..0000000 --- a/applications/roles/media/README.md +++ /dev/null @@ -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 diff --git a/applications/roles/media/defaults/main.yml b/applications/roles/media/defaults/main.yml deleted file mode 100644 index 115e098..0000000 --- a/applications/roles/media/defaults/main.yml +++ /dev/null @@ -1,8 +0,0 @@ ---- -TZ: "America/New_York" -PUID: 1000 -PGID: 1000 - -DOWNLOAD_FOLDER: "/mnt/downloads" -CONFIG_FOLDER: "~/.config/" -MEDIA_FOLDER: "/mnt/content" diff --git a/applications/roles/media/handlers/main.yml b/applications/roles/media/handlers/main.yml deleted file mode 100644 index 806d584..0000000 --- a/applications/roles/media/handlers/main.yml +++ /dev/null @@ -1,4 +0,0 @@ ---- -- name: Manual Share Mount - become: true - command: "sudo mount -a" diff --git a/applications/roles/media/meta/main.yml b/applications/roles/media/meta/main.yml deleted file mode 100644 index 6220ea8..0000000 --- a/applications/roles/media/meta/main.yml +++ /dev/null @@ -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. diff --git a/applications/roles/media/tasks/main.yml b/applications/roles/media/tasks/main.yml deleted file mode 100644 index 3699bc3..0000000 --- a/applications/roles/media/tasks/main.yml +++ /dev/null @@ -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"