Skip to content

Commit

Permalink
πŸ› Fix the keycloak pod name selector...
Browse files Browse the repository at this point in the history
So it doesn't give the below error when there are other pods with more
than 1 container in the namespace

```
error executing jsonpath \"{.items[?(@.spec.containers[*].name==\\\"keycloak\\\")].metadata.name}\": can only compare one element at a time
```
  • Loading branch information
david-martin committed Apr 17, 2018
1 parent 9f2c755 commit 0f51b2e
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion roles/provision-keycloak-apb/tasks/provision-keycloak.yml
Original file line number Diff line number Diff line change
Expand Up @@ -113,7 +113,7 @@
dest: /tmp/keycloak-metrics-spi-1.0-SNAPSHOT.jar

- name: Get the name of the keycloak pod
shell: oc get pods -n '{{ namespace }}' -o jsonpath='{.items[?(@.spec.containers[*].name=="keycloak")].metadata.name}'
shell: oc get pods -n '{{ namespace }}' -o jsonpath='{.items[?(@.spec.containers[0].name=="keycloak")].metadata.name}'
register: keycloak_pod_name
retries: 10
until: '"keycloak" in keycloak_pod_name.stdout'
Expand Down

0 comments on commit 0f51b2e

Please sign in to comment.