mirror of
https://gitea.0xace.cc/ansible-galaxy/wireguard-ui.git
synced 2024-11-24 23:36:41 +00:00
29 lines
1.1 KiB
YAML
29 lines
1.1 KiB
YAML
|
- 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
|
||
|
env: "{{ wireguard_ui_combined_env }}"
|
||
|
volumes: "{{ wireguard_ui_combined_volumes }}"
|
||
|
when:
|
||
|
- wireguard_ui_container_engine == 'docker'
|
||
|
- not wireguard_ui_container.changed
|
||
|
|
||
|
- 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
|
||
|
env: "{{ wireguard_ui_combined_env }}"
|
||
|
volumes: "{{ wireguard_ui_combined_volumes }}"
|
||
|
when:
|
||
|
- wireguard_ui_container_engine == 'podman'
|
||
|
- not wireguard_ui_container.changed
|