Advertisement
Guest User

plex-utils PG Script

a guest
Mar 27th, 2022
105
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Bash 2.02 KB | None | 0 0
  1. #!/bin/bash
  2. #
  3. # Title:      PlexGuide (Reference Title File)
  4. # Author(s):  Admin9705
  5. # URL:        https://plexguide.com - http://github.plexguide.com
  6. # GNU:        General Public License v3.0
  7. ################################################################################
  8. ---
  9. - hosts: localhost
  10.   gather_facts: false
  11.   tasks:
  12.     # FACTS #######################################################################
  13.     - name: 'Set Known Facts'
  14.       set_fact:
  15.         pgrole: 'plex-utils'
  16.         intport: '80'
  17.         extport: '25000'
  18.         image: 'jkirkcaldy/plex-utills'
  19.  
  20.     # CORE (MANDATORY) ############################################################
  21.     - name: 'Including cron job'
  22.       include_tasks: '/opt/communityapps/apps/_core.yml'
  23.  
  24.     # LABELS ######################################################################
  25.     - name: 'Adding Traefik'
  26.       set_fact:
  27.         pg_labels:
  28.           traefik.frontend.auth.forward.address: '{{gauth}}'
  29.           traefik.enable: 'true'
  30.           traefik.port: '{{intport}}'
  31.           traefik.frontend.rule: 'Host:{{pgrole}}.{{domain.stdout}},{{tldset}}'
  32.  
  33.     - name: 'Setting PG Volumes'
  34.       set_fact:
  35.         pg_volumes:
  36.           - '/opt/appdata/plex-utils:/config'
  37.           - '/opt/appdata/plex-utils:/logs'
  38.           - '/mnt/unionfs/:/films'
  39.  
  40.     - name: 'Setting PG ENV'
  41.       set_fact:
  42.         pg_env:
  43.           PUID: 1000
  44.           PGID: 1000
  45.  
  46.     # MAIN DEPLOYMENT #############################################################
  47.     - name: 'Deploying {{pgrole}}'
  48.       docker_container:
  49.         name: '{{pgrole}}'
  50.         image: '{{image}}'
  51.         pull: yes
  52.         published_ports:
  53.           - '{{ports.stdout}}{{extport}}:{{intport}}'
  54.         volumes: '{{pg_volumes}}'
  55.         env: '{{pg_env}}'
  56.         restart_policy: unless-stopped
  57.         networks:
  58.           - name: plexguide
  59.             aliases:
  60.               - '{{pgrole}}'
  61.         state: started
  62.         labels: '{{pg_labels}}'
  63.  
  64. ##PG-Community
  65.  
  66. ##PG-Community
  67.  
  68. ##PG-Community
  69.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement