mirror of
https://gitea.0xace.cc/ansible-galaxy/wireguard-ui.git
synced 2025-06-29 03:03:07 +00:00
first commit
This commit is contained in:
36
tasks/main.yaml
Normal file
36
tasks/main.yaml
Normal file
@ -0,0 +1,36 @@
|
||||
- name: Make sure handlers are flushed immediately
|
||||
meta: flush_handlers
|
||||
|
||||
- name: Load a variable file based on the OS type
|
||||
include_vars: "{{ lookup('first_found', params) }}"
|
||||
vars:
|
||||
params:
|
||||
files:
|
||||
- "{{ ansible_facts['distribution'] }}.yaml"
|
||||
- "{{ ansible_facts['os_family'] }}.yaml"
|
||||
paths:
|
||||
- "vars"
|
||||
tags: wireguard_ui_vars
|
||||
|
||||
- set_fact:
|
||||
wireguard_ui_combined_env: "{{ wireguard_ui_default_env | combine(wireguard_ui_env, recursive=true) }}"
|
||||
wireguard_ui_combined_volumes: "{{ wireguard_ui_default_volumes | combine(wireguard_ui_volumes, recursive=true) }}"
|
||||
|
||||
- name: "Install WireGuard UI for {{ ansible_facts['os_family'] }}"
|
||||
include_tasks: "{{ ansible_facts['os_family'] }}/main.yaml"
|
||||
tags: wireguard_ui_install
|
||||
|
||||
- name: Enable and start WireGuard UI services
|
||||
systemd:
|
||||
daemon_reload: true
|
||||
name: "{{ item }}"
|
||||
enabled: true
|
||||
state: started
|
||||
masked: no
|
||||
loop:
|
||||
- "{{ wireguard_ui_systemd_unit_name }}"
|
||||
- "{{ wireguard_ui_watcher_systemd_service_unit_name }}"
|
||||
- "{{ wireguard_ui_watcher_systemd_path_unit_name }}"
|
||||
|
||||
tags: wireguard_ui_start
|
||||
|
Reference in New Issue
Block a user