mirror of
https://gitea.0xace.cc/ansible-galaxy/wireguard-ui.git
synced 2025-04-06 01:01:56 +00:00
fix combined volumes end envs
This commit is contained in:
parent
8b8d89f213
commit
2df5e60dc1
@ -7,8 +7,8 @@
|
|||||||
container_default_behavior: no_defaults
|
container_default_behavior: no_defaults
|
||||||
detach: true
|
detach: true
|
||||||
restart_policy: unless-stopped
|
restart_policy: unless-stopped
|
||||||
env: "{{ wireguard_ui_combined_env }}"
|
env: "{{ wireguard_ui_env }}"
|
||||||
volumes: "{{ wireguard_ui_combined_volumes }}"
|
volumes: "{{ wireguard_ui_volumes }}"
|
||||||
when:
|
when:
|
||||||
- wireguard_ui_container_engine == 'docker'
|
- wireguard_ui_container_engine == 'docker'
|
||||||
- not wireguard_ui_container.changed
|
- not wireguard_ui_container.changed
|
||||||
@ -21,8 +21,8 @@
|
|||||||
image: "{{ wireguard_ui_container_registry }}/{{ wireguard_ui_image_name }}:{{ wireguard_ui_image_tag }}"
|
image: "{{ wireguard_ui_container_registry }}/{{ wireguard_ui_image_name }}:{{ wireguard_ui_image_tag }}"
|
||||||
state: started
|
state: started
|
||||||
restart: yes
|
restart: yes
|
||||||
env: "{{ wireguard_ui_combined_env }}"
|
env: "{{ wireguard_ui_env }}"
|
||||||
volumes: "{{ wireguard_ui_combined_volumes }}"
|
volumes: "{{ wireguard_ui_volumes }}"
|
||||||
when:
|
when:
|
||||||
- wireguard_ui_container_engine == 'podman'
|
- wireguard_ui_container_engine == 'podman'
|
||||||
- not wireguard_ui_container.changed
|
- not wireguard_ui_container.changed
|
||||||
|
@ -23,8 +23,8 @@
|
|||||||
network_mode: "{{ wireguard_ui_network_mode }}"
|
network_mode: "{{ wireguard_ui_network_mode }}"
|
||||||
image: "{{ wireguard_ui_container_registry }}/{{ wireguard_ui_image_name }}:{{ wireguard_ui_image_tag }}"
|
image: "{{ wireguard_ui_container_registry }}/{{ wireguard_ui_image_name }}:{{ wireguard_ui_image_tag }}"
|
||||||
state: created
|
state: created
|
||||||
env: "{{ wireguard_ui_combined_env }}"
|
env: "{{ wireguard_ui_env }}"
|
||||||
volumes: "{{ wireguard_ui_combined_volumes }}"
|
volumes: "{{ wireguard_ui_volumes }}"
|
||||||
register: wireguard_ui_container
|
register: wireguard_ui_container
|
||||||
notify: Restart WireGuard UI with podman
|
notify: Restart WireGuard UI with podman
|
||||||
|
|
||||||
|
@ -14,12 +14,12 @@
|
|||||||
|
|
||||||
- name: Merge volumes
|
- name: Merge volumes
|
||||||
set_fact:
|
set_fact:
|
||||||
wireguard_ui_combined_volumes: "{{ wireguard_ui_default_volumes | default({}) + [item.key +':'+ item.value] }}"
|
wireguard_ui_volumes: "{{ wireguard_ui_volumes | default([]) + [item.key +':'+ item.value] }}"
|
||||||
loop: "{{ wireguard_ui_volumes | default({}) | dict2items }}"
|
loop: "{{ wireguard_ui_default_volumes | dict2items }}"
|
||||||
|
|
||||||
- name: Merge ENV
|
- name: Merge ENV
|
||||||
set_fact:
|
set_fact:
|
||||||
wireguard_ui_combined_env: "{{ wireguard_ui_default_env | combine(wireguard_ui_env, recursive=true) }}"
|
wireguard_ui_env: "{{ wireguard_ui_default_env | combine(wireguard_ui_env | default({}), recursive=true) }}"
|
||||||
|
|
||||||
- name: "Install WireGuard UI for {{ ansible_facts['os_family'] }}"
|
- name: "Install WireGuard UI for {{ ansible_facts['os_family'] }}"
|
||||||
include_tasks: "{{ ansible_facts['os_family'] }}/main.yaml"
|
include_tasks: "{{ ansible_facts['os_family'] }}/main.yaml"
|
||||||
|
Loading…
x
Reference in New Issue
Block a user