Add files via upload

This commit is contained in:
MrDoobPG
2019-05-24 23:50:16 +02:00
committed by GitHub
parent 4e0e586e77
commit 6bbd15fe55

View File

@@ -1,65 +1,64 @@
#!/bin/bash #!/bin/bash
# #
# Title: PGBlitz (Reference Title File) # Title: PGBlitz (linuxserver/airsonic)
# Author(s): Admin9705 # Author(s): MrDoob
# URL: https://pgblitz.com - http://github.pgblitz.com # URL: https://pgblitz.com - http://github.pgblitz.com
# GNU: General Public License v3.0 # GNU: General Public License v3.0
################################################################################ ################################################################################
--- ---
- hosts: localhost - hosts: localhost
gather_facts: false gather_facts: false
tasks: tasks:
# FACTS ####################################################################### # FACTS #######################################################################
- name: 'Set Known Facts' - name: 'Set Known Facts'
set_fact: set_fact:
pgrole: 'airsonic' pgrole: 'airsonic'
intport: '4040' intport: '4040'
extport: '4040' extport: '4040'
image: 'airsonic/airsonic' image: 'linuxserver/airsonic'
# CORE (MANDATORY) ############################################################ # CORE (MANDATORY) ############################################################
- name: 'Including cron job' - name: 'Including cron job'
include_tasks: '/opt/communityapps/apps/_core.yml' include_tasks: '/opt/communityapps/apps/_core.yml'
# LABELS ###################################################################### # LABELS ######################################################################
- name: 'Adding Traefik' - name: 'Adding Traefik'
set_fact: set_fact:
pg_labels: pg_labels:
traefik.enable: 'true' traefik.frontend.auth.forward.address: '{{gauth}}'
traefik.port: '{{intport}}' traefik.enable: 'true'
traefik.frontend.auth.forward.address: '{{gauth}}' traefik.port: '{{intport}}'
traefik.frontend.rule: 'Host:{{pgrole}}.{{domain.stdout}},{{tldset}}' traefik.frontend.rule: 'Host:{{pgrole}}.{{domain.stdout}},{{tldset}}'
- name: 'Setting PG Volumes' - name: 'Setting PG Volumes'
set_fact: set_fact:
pg_volumes: pg_volumes:
- '/etc/localtime:/etc/localtime:ro' - '/opt/appdata/{{pgrole}}/config:/config:rw'
- '/opt/appdata/{{pgrole}}:/airsonic/data' - '{{path.stdout}}:{{path.stdout}}'
- '/opt/appdata/{{pgrole}}/playlists:/airsonic/playlists' - '/mnt/unionfs:/media:ro'
- '/opt/appdata/{{pgrole}}/podcasts:/airsonic/podcasts' - '/etc/localtime:/etc/localtime:ro'
- '{{path.stdout}}:{{path.stdout}}'
- '/mnt:/mnt' - name: 'Setting PG ENV'
set_fact:
- name: 'Setting PG ENV' pg_env:
set_fact: PUID: '1000'
pg_env: PGID: '1000'
PUID: '1000' TZ: '${TZ}'
PGID: '1000'
# MAIN DEPLOYMENT #############################################################
# MAIN DEPLOYMENT ############################################################# - name: 'Deploying {{pgrole}}'
- name: 'Deploying {{pgrole}}' docker_container:
docker_container: name: '{{pgrole}}'
name: '{{pgrole}}' image: '{{image}}'
image: '{{image}}' pull: yes
pull: yes published_ports: <<<<not exposed
published_ports: - '{{ports.stdout}}{{extport}}:{{intport}}'
- '{{ports.stdout}}{{extport}}:{{intport}}' volumes: '{{pg_volumes}}'
volumes: '{{pg_volumes}}' env: '{{pg_env}}'
env: '{{pg_env}}' restart_policy: unless-stopped
restart_policy: unless-stopped networks:
networks: - name: plexguide
- name: plexguide aliases:
aliases: - '{{pgrole}}'
- '{{pgrole}}' state: started
state: started labels: '{{pg_labels}}'
labels: '{{pg_labels}}'