Created
November 23, 2018 11:42
-
-
Save odra/aff22a493b372739e8b8dbf12e27cbeb to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
- | |
name: Set apicurio client id var | |
set_fact: | |
apicurio_kc_client: "{{ item.id }}" | |
with_items: "{{ (sso_kc_realm_cmd.stdout | from_json).spec.clients }}" | |
when: item.id == apicurio_kc_client_id | |
- | |
name: Inject apicurio client in CR if it does not exist | |
shell: "oc patch keycloakrealm {{ apicurio_kc_realm }} -n {{ apicurio_keycloak_namespace }} --type=json -p '[{\"op\": \"add\", \"path\": \"/spec/clients/-\", \"value\": {{ lookup('file', apicurio_kc_cient_json_path) }}}]'" | |
register: result | |
until: not result.stderr | |
retries: 50 | |
delay: 10 | |
failed_when: result.stderr | |
changed_when: result.stdout | |
when: apicurio_kc_client is undefined |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment