fix deploy and bump to 0.4.0

This commit is contained in:
ace
2023-03-10 16:18:46 +03:00
parent 352428ce8c
commit fd0c675ce6
8 changed files with 33 additions and 27 deletions

View File

@ -11,10 +11,20 @@
loop: '{{ wireguard_ui_container_registry_auth | dict2items }}'
when: wireguard_ui_container_registry_auth is defined
- name: Create configuration dir for WireGuard UI
- name: Create configuration dir and subdirs for WireGuard UI
file:
name: "{{ wireguard_ui_config_dir }}"
name: "{{ item }}"
state: directory
loop:
- "{{ wireguard_ui_config_dir }}"
- "{{ wireguard_ui_config_dir }}/server"
- name: Force login and password change
template:
dest: "{{ wireguard_ui_config_dir }}/server/users.json"
src: users.json.j2
register: wireguard_ui_auth
notify: Restart WireGuard UI with podman
- name: Create WireGuard UI with podman
containers.podman.podman_container:
@ -23,18 +33,13 @@
network_mode: "{{ wireguard_ui_network_mode }}"
image: "{{ wireguard_ui_container_registry }}/{{ wireguard_ui_image_name }}:{{ wireguard_ui_image_tag }}"
state: created
cap_add:
- NET_ADMIN
env: "{{ wireguard_ui_combined_env }}"
volumes: "{{ wireguard_ui_combined_volumes }}"
volumes: "{{ wireguard_ui_volumes }}"
register: wireguard_ui_container
notify: Restart WireGuard UI with podman
- name: Force login and password change
template:
dest: "{{ wireguard_ui_config_dir }}/server/users.json"
src: users.json.j2
register: wireguard_ui_auth
notify: Restart WireGuard UI with podman
- name: Generate container systemd unit
shell: "podman generate systemd {{ wireguard_ui_container_name }}"
register: wireguard_ui_systemd_unit