wireguard-ui/handlers/main.yaml

31 lines
1.1 KiB
YAML
Raw Normal View History

2022-07-13 11:51:25 +00:00
- name: Restart WireGuard UI with docker
community.docker.docker_container:
name: "{{ wireguard_ui_container_name }}"
image: "{{ wireguard_ui_container_registry }}/{{ wireguard_ui_image_name }}:{{ wireguard_ui_image_tag }}"
state: started
restart: yes
container_default_behavior: no_defaults
detach: true
restart_policy: unless-stopped
2022-07-15 15:14:47 +00:00
env: "{{ wireguard_ui_combined_env }}"
2023-03-10 13:18:46 +00:00
volumes: "{{ wireguard_ui_volumes }}"
2022-07-13 11:51:25 +00:00
when:
- wireguard_ui_container_engine == 'docker'
2024-03-31 22:52:24 +00:00
- wireguard_ui_container.changed
- wireguard_ui_auth.changed
2022-07-13 11:51:25 +00:00
- name: Restart WireGuard UI with podman
containers.podman.podman_container:
name: "{{ wireguard_ui_container_name }}"
hostname: "{{ wireguard_ui_container_name }}"
network: "{{ wireguard_ui_network_mode }}"
image: "{{ wireguard_ui_container_registry }}/{{ wireguard_ui_image_name }}:{{ wireguard_ui_image_tag }}"
state: started
restart: yes
2022-07-15 15:14:47 +00:00
env: "{{ wireguard_ui_combined_env }}"
2023-03-10 13:18:46 +00:00
volumes: "{{ wireguard_ui_volumes }}"
2022-07-13 11:51:25 +00:00
when:
- wireguard_ui_container_engine == 'podman'
2024-03-31 22:52:24 +00:00
- wireguard_ui_container.changed
- wireguard_ui_auth.changed