From ced3ff35adb065a9270b82912990314bb5926278 Mon Sep 17 00:00:00 2001 From: TuDatTr Date: Mon, 17 Apr 2023 16:23:16 +0200 Subject: [PATCH] Changed docker/plex to use direct connections Signed-off-by: TuDatTr --- group_vars/all/vars.yml | 2 ++ host_vars/aya01.yml | 2 +- host_vars/mii.yml | 2 +- host_vars/pi.yml | 2 +- roles/docker/templates/aya01/compose.yaml | 1 + roles/docker/templates/mii/swag/site-confs/plex.subdomain.conf | 2 +- 6 files changed, 7 insertions(+), 4 deletions(-) diff --git a/group_vars/all/vars.yml b/group_vars/all/vars.yml index d02ef9a..9307da2 100644 --- a/group_vars/all/vars.yml +++ b/group_vars/all/vars.yml @@ -8,6 +8,7 @@ remote_domain: tudattr.dev rclone_config: "/root/.config/rclone/" puid: 1000 pgid: 1000 +pk_path: "/mnt/veracrypt1/genesis" # @@ -227,6 +228,7 @@ swag_remote_site_confs: "{{swag_config}}/nginx/site-confs/" # plex_host: "plex" +plex_ip: "172.16.69.12" plex_port: "32400" plex_config: "{{docker_data_dir}}/plex/config" plex_tv: "/media/series" diff --git a/host_vars/aya01.yml b/host_vars/aya01.yml index c794f85..4c1a11d 100644 --- a/host_vars/aya01.yml +++ b/host_vars/aya01.yml @@ -1,5 +1,5 @@ ansible_user: "{{ user }}" ansible_host: 192.168.20.12 ansible_port: 22 -ansible_ssh_private_key_file: /media/veracrypt1/genesis +ansible_ssh_private_key_file: '{{ pk_path }}' ansible_become_pass: '{{ vault_aya01_tudattr_password }}' diff --git a/host_vars/mii.yml b/host_vars/mii.yml index e26a987..795db6e 100644 --- a/host_vars/mii.yml +++ b/host_vars/mii.yml @@ -1,5 +1,5 @@ ansible_user: "{{ user }}" ansible_host: 202.61.207.139 ansible_port: 22 -ansible_ssh_private_key_file: /media/veracrypt1/genesis +ansible_ssh_private_key_file: '{{ pk_path }}' ansible_become_pass: '{{ vault_mii_tudattr_password }}' diff --git a/host_vars/pi.yml b/host_vars/pi.yml index 7494d91..5d8c542 100644 --- a/host_vars/pi.yml +++ b/host_vars/pi.yml @@ -1,5 +1,5 @@ ansible_user: "{{ user }}" ansible_host: 192.168.20.11 ansible_port: 22 -ansible_ssh_private_key_file: /media/veracrypt1/genesis +ansible_ssh_private_key_file: '{{ pk_path }}' ansible_become_pass: '{{ vault_pi_tudattr_password }}' diff --git a/roles/docker/templates/aya01/compose.yaml b/roles/docker/templates/aya01/compose.yaml index 6c7f383..15c7917 100644 --- a/roles/docker/templates/aya01/compose.yaml +++ b/roles/docker/templates/aya01/compose.yaml @@ -181,6 +181,7 @@ services: image: lscr.io/linuxserver/plex:latest container_name: plex restart: always + ip: {{ plex_ip }} networks: - net ports: diff --git a/roles/docker/templates/mii/swag/site-confs/plex.subdomain.conf b/roles/docker/templates/mii/swag/site-confs/plex.subdomain.conf index b32936a..ce93ee6 100644 --- a/roles/docker/templates/mii/swag/site-confs/plex.subdomain.conf +++ b/roles/docker/templates/mii/swag/site-confs/plex.subdomain.conf @@ -12,7 +12,7 @@ server { location / { include /config/nginx/resolver.conf; - proxy_pass http://plex.aya01.borg.land; + proxy_pass http://{{ plex_ip | replace('.','-') }}.{{ vault_plex_server_id }}.plex.direct:{{ plex_port }}/ proxy_set_header X-Plex-Client-Identifier $http_x_plex_client_identifier; proxy_set_header X-Plex-Device $http_x_plex_device;