mirror of
https://gitea.0xace.cc/ansible-galaxy/wireguard-ui.git
synced 2024-11-24 23:36:41 +00:00
fix wireguard-ui
This commit is contained in:
parent
871667ef0c
commit
ba2e09f3aa
1
.gitignore
vendored
Normal file
1
.gitignore
vendored
Normal file
@ -0,0 +1 @@
|
|||||||
|
.galaxy_install_info
|
@ -9,10 +9,12 @@ wireguard_ui_systemd_unit_name: "{{ wireguard_ui_container_name }}.service"
|
|||||||
wireguard_ui_watcher_systemd_service_unit_name: "{{ wireguard_ui_container_name }}-watcher.service"
|
wireguard_ui_watcher_systemd_service_unit_name: "{{ wireguard_ui_container_name }}-watcher.service"
|
||||||
wireguard_ui_watcher_systemd_path_unit_name: "{{ wireguard_ui_container_name }}-watcher.path"
|
wireguard_ui_watcher_systemd_path_unit_name: "{{ wireguard_ui_container_name }}-watcher.path"
|
||||||
|
|
||||||
|
#wireguard_ui_volumes: {}
|
||||||
wireguard_ui_default_volumes:
|
wireguard_ui_default_volumes:
|
||||||
- "/etc/wireguard:/etc/wireguard:Z"
|
'/etc/wireguard': /etc/wireguard:Z
|
||||||
- "{{ wireguard_ui_config_dir }}:/app/db:Z"
|
'{{ wireguard_ui_config_dir }}': /app/db:Z
|
||||||
|
|
||||||
|
#wireguard_ui_env: {}
|
||||||
wireguard_ui_default_env:
|
wireguard_ui_default_env:
|
||||||
WGUI_USERNAME: admin
|
WGUI_USERNAME: admin
|
||||||
WGUI_PASSWORD: admin
|
WGUI_PASSWORD: admin
|
||||||
|
@ -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
|
||||||
|
|
||||||
- name: Generate container systemd unit
|
- name: Generate container systemd unit
|
||||||
|
@ -12,9 +12,14 @@
|
|||||||
- "vars"
|
- "vars"
|
||||||
tags: wireguard_ui_vars
|
tags: wireguard_ui_vars
|
||||||
|
|
||||||
- set_fact:
|
- name: Merge volumes
|
||||||
wireguard_ui_combined_env: "{{ wireguard_ui_default_env | combine(wireguard_ui_env, recursive=true) }}"
|
set_fact:
|
||||||
wireguard_ui_combined_volumes: "{{ wireguard_ui_default_volumes | combine(wireguard_ui_volumes, recursive=true) }}"
|
wireguard_ui_volumes: "{{ wireguard_ui_volumes|default([]) + [item.key +':'+ item.value] }}"
|
||||||
|
loop: "{{ wireguard_ui_default_volumes | dict2items }}"
|
||||||
|
|
||||||
|
- name: Merge ENV
|
||||||
|
set_fact:
|
||||||
|
wireguard_ui_env: "{{ wireguard_ui_env | default({}) | combine(wireguard_ui_default_env, 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…
Reference in New Issue
Block a user