From f678dfbefe420061ad212d64f4e231c4bfcce8c3 Mon Sep 17 00:00:00 2001 From: SequeI Date: Tue, 3 Dec 2024 11:47:22 +0000 Subject: [PATCH] fix --- molecule/default/verify.yml | 1 + vm-testing/play.yml | 2 +- vm-testing/playbooks/dex-config.yaml | 39 +--------------------------- 3 files changed, 3 insertions(+), 39 deletions(-) mode change 100644 => 120000 vm-testing/playbooks/dex-config.yaml diff --git a/molecule/default/verify.yml b/molecule/default/verify.yml index 3514a65..d5aad00 100644 --- a/molecule/default/verify.yml +++ b/molecule/default/verify.yml @@ -11,6 +11,7 @@ ansible.builtin.shell: | podman inspect dex-idp | grep rhtas register: network_check + ignore_errors: true - name: Adding Dex instance to RHTAS network ansible.builtin.shell: podman network connect rhtas dex-idp diff --git a/vm-testing/play.yml b/vm-testing/play.yml index 34554e2..b7604ca 100644 --- a/vm-testing/play.yml +++ b/vm-testing/play.yml @@ -29,4 +29,4 @@ - name: Adding Dex to RHTAS network ansible.builtin.shell: | podman network connect rhtas dex-idp - when: network_check.stdout != "" + when: network_check.stdout == "" diff --git a/vm-testing/playbooks/dex-config.yaml b/vm-testing/playbooks/dex-config.yaml deleted file mode 100644 index d5f4702..0000000 --- a/vm-testing/playbooks/dex-config.yaml +++ /dev/null @@ -1,38 +0,0 @@ ---- -- name: Check if Podman is available - ansible.builtin.package: - name: podman - state: present - -- name: Create Dex config directory - ansible.builtin.file: - path: "/etc/dex/config" - state: directory - mode: "0755" - -- name: Copy Dex config over - ansible.builtin.copy: - src: "../dex-config.yaml" - dest: "/etc/dex/config/dex.yaml" - mode: "0644" - -- name: Check if Dex container exists - ansible.builtin.shell: | - podman ps -a | grep dex-idp - register: container_check - ignore_errors: true - -- name: Run Dex container - ansible.builtin.shell: | - podman run -d \ - --name dex-idp \ - -p 5556:5556 \ - -v /etc/dex/config/dex.yaml:/etc/dex/cfg/dex.yaml:Z \ - quay.io/asiek/dexidp:v2.32.0 \ - dex serve /etc/dex/cfg/dex.yaml - when: container_check.stdout == "" - -- name: Dex container health check - ansible.builtin.shell: curl http://127.0.0.1:5556/dex/healthz - retries: 3 - delay: 5 diff --git a/vm-testing/playbooks/dex-config.yaml b/vm-testing/playbooks/dex-config.yaml new file mode 120000 index 0000000..1d2778f --- /dev/null +++ b/vm-testing/playbooks/dex-config.yaml @@ -0,0 +1 @@ +/home/asiek/WORK/ansible_collections/rhtas/artifact_signer_ansible/molecule/dex-config.yaml \ No newline at end of file