From db9e8b86cc4fc6633f0b9cd370d4f67f20d3cfae Mon Sep 17 00:00:00 2001 From: ace Date: Thu, 14 Jul 2022 22:38:16 +0300 Subject: [PATCH] force login and password change --- handlers/main.yaml | 2 ++ tasks/RedHat/podman.yaml | 8 ++++++++ 2 files changed, 10 insertions(+) diff --git a/handlers/main.yaml b/handlers/main.yaml index 058211f..e022714 100644 --- a/handlers/main.yaml +++ b/handlers/main.yaml @@ -12,6 +12,7 @@ when: - wireguard_ui_container_engine == 'docker' - not wireguard_ui_container.changed + - not wireguard_ui_auth.changed - name: Restart WireGuard UI with podman containers.podman.podman_container: @@ -26,3 +27,4 @@ when: - wireguard_ui_container_engine == 'podman' - not wireguard_ui_container.changed + - not wireguard_ui_auth.changed diff --git a/tasks/RedHat/podman.yaml b/tasks/RedHat/podman.yaml index e2f0cba..637c862 100644 --- a/tasks/RedHat/podman.yaml +++ b/tasks/RedHat/podman.yaml @@ -28,6 +28,14 @@ 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 + when: wireguard_ui_auth.changed + - name: Generate container systemd unit shell: "podman generate systemd {{ wireguard_ui_container_name }}" register: wireguard_ui_systemd_unit