Skip to content

Commit

Permalink
plex: add lan IP variable to toggle custom access url when port is bound
Browse files Browse the repository at this point in the history
closes #155
  • Loading branch information
saltydk committed Dec 22, 2023
1 parent 9e5a66f commit e1ae9f7
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion roles/plex/defaults/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@ plex_open_local_ports: false
plex_plugin_webtools: true
plex_plugin_sub_zero: true
plex_insecure: false
plex_lan_ip: ""

################################
# Proxy
Expand Down Expand Up @@ -185,7 +186,9 @@ plex_docker_ports: "{{ lookup('vars', plex_name + '_docker_ports_defaults', defa
plex_docker_envs_advertise_ip_url: "{{ lookup('vars', plex_name + '_web_url', default=plex_web_url) + ':443,' + lookup('vars', plex_name + '_web_insecure_url', default=plex_web_insecure_url) + ':80'
if plex_insecure
else lookup('vars', plex_name + '_web_url', default=plex_web_url) + ':443' }}"
plex_docker_envs_advertise_ip: "{{ lookup('vars', plex_name + '_docker_envs_advertise_ip_url', default=plex_docker_envs_advertise_ip_url) }}"
plex_docker_envs_advertise_ip: "{{ 'http://' + plex_lan_ip + ':32400,' + lookup('vars', plex_name + '_docker_envs_advertise_ip_url', default=plex_docker_envs_advertise_ip_url)
if (plex_lan_ip | length > 0) and plex_open_main_ports
else lookup('vars', plex_name + '_docker_envs_advertise_ip_url', default=plex_docker_envs_advertise_ip_url) }}"
plex_docker_envs_default:
PLEX_UID: "{{ uid }}"
PLEX_GID: "{{ gid }}"
Expand Down

0 comments on commit e1ae9f7

Please sign in to comment.