mirror of
https://gitea.0xace.cc/ansible-galaxy/wireguard-ui.git
synced 2025-04-05 16:51:57 +00:00
use separate naming for combined vars
This commit is contained in:
parent
77461f5d51
commit
d657e1a7ee
@ -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_env }}"
|
env: "{{ wireguard_ui_combined_env }}"
|
||||||
volumes: "{{ wireguard_ui_volumes }}"
|
volumes: "{{ wireguard_ui_combined_volumes }}"
|
||||||
when:
|
when:
|
||||||
- wireguard_ui_container_engine == 'docker'
|
- wireguard_ui_container_engine == 'docker'
|
||||||
- not wireguard_ui_container.changed
|
- not wireguard_ui_container.changed
|
||||||
@ -22,8 +22,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_env }}"
|
env: "{{ wireguard_ui_combined_env }}"
|
||||||
volumes: "{{ wireguard_ui_volumes }}"
|
volumes: "{{ wireguard_ui_combined_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_env }}"
|
env: "{{ wireguard_ui_combined_env }}"
|
||||||
volumes: "{{ wireguard_ui_volumes }}"
|
volumes: "{{ wireguard_ui_combined_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_volumes: "{{ wireguard_ui_volumes | default([]) + [item.key +':'+ item.value] }}"
|
wireguard_ui_combined_volumes: "{{ wireguard_ui_volumes | default([]) + [item.key +':'+ item.value] }}"
|
||||||
loop: "{{ wireguard_ui_default_volumes | dict2items }}"
|
loop: "{{ wireguard_ui_default_volumes | dict2items }}"
|
||||||
|
|
||||||
- name: Merge ENV
|
- name: Merge ENV
|
||||||
set_fact:
|
set_fact:
|
||||||
wireguard_ui_env: "{{ wireguard_ui_default_env | combine(wireguard_ui_env | default({}), recursive=true) }}"
|
wireguard_ui_combined_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