--- - name: Initialize new authenticator config ansible.builtin.set_fact: test_authenticator: - name: keycloak realm: my_test_realm issuerID: https://softwarefactory-project.io/auth/realms/SF clientID: zuul - name: Add the authenticator to spec ansible.builtin.include_role: name: "update-custom-resource" vars: cr_spec: zuul: oidcAuthenticators: "{{ test_authenticator }}" - name: Wait for the new authenticator to appear in the Zuul API ansible.builtin.uri: url: "https://{{ zuul_endpoint }}/api/tenant/internal/info" method: GET return_content: true validate_certs: "{{ validate_certs }}" register: this until: "'my_test_realm' in this.content" retries: "{{ zuul_api_retries }}" delay: "{{ zuul_api_delay }}" - name: Remove the test authenticator from the spec ansible.builtin.include_role: name: "update-custom-resource" vars: cr_spec: zuul: oidcAuthenticators: [] - name: Wait for the test authenticator to be delisted ansible.builtin.uri: url: "https://{{ zuul_endpoint }}/api/tenant/internal/info" method: GET return_content: true validate_certs: "{{ validate_certs }}" register: this until: "'my_test_realm' not in this.content" retries: "{{ zuul_api_retries }}" delay: "{{ zuul_api_delay }}"