Skip to content

Commit

Permalink
plex: add manual override to network mode instance failure
Browse files Browse the repository at this point in the history
  • Loading branch information
saltydk committed Sep 18, 2023
1 parent 34e1298 commit 358b4bb
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
2 changes: 2 additions & 0 deletions roles/plex/defaults/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,8 @@ plex_proxy_dict:
http_proxy: "{{ plex_proxy if (plex_proxy | length > 0) else '' }}"
https_proxy: "{{ plex_proxy if (plex_proxy | length > 0) else '' }}"

plex_proxy_instances_override: false

################################
# Paths
################################
Expand Down
6 changes: 4 additions & 2 deletions roles/plex/tasks/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,10 @@
---
- name: "Fail if using network_mode 'container:' with multiple instances."
ansible.builtin.fail:
msg: "Using multiple instances of Plex with network_mode '{{ plex_docker_network_mode | default('') }}' is not supported"
when: ('container:' in lookup('vars', 'plex_docker_network_mode', default=plex_docker_network_mode_default)) and (plex_instances | length > 1)
msg:
- "Using multiple instances of Plex with network_mode '{{ plex_docker_network_mode | default('') }}' is not supported"
- "You can override this failure by setting plex_proxy_instances_override to true but remember to use unique VPN containers for each instance."
when: not plex_proxy_instances_override and ('container:' in lookup('vars', 'plex_docker_network_mode', default=plex_docker_network_mode_default)) and (plex_instances | length > 1)

- name: "Execute Plex roles"
ansible.builtin.include_tasks: main2.yml
Expand Down

0 comments on commit 358b4bb

Please sign in to comment.