Fix keycloak container restart handler

This handler used an incorrect path to the docker-compose file and
failed with no such file or directory errors. Update the handler to use
the correct path to the docker-compose file.

I also add a note that the check to avoid restarts when we just
restarted containers may not be working as we did restart at least the
mariadb container which is how I discovered this issue.

Change-Id: If004b72e3efc0d0d4665c6fd56e514a5cb6191c5
This commit is contained in:
Clark Boylan 2025-02-05 09:29:24 -08:00
parent 6648760059
commit 4ed1d2c63a

View File

@ -5,11 +5,13 @@
- name: keycloak restart containers if running
# Also makes sure the containers weren't just restarted by an image update
# TODO(clarkb) the check that we weren't just restarted by an image update
# doesn't seem to work possibly due to our pin on the keycloak version.
when: quarkus_pids.rc == 0 and "is up-to-date" in keycloak_dcup.stderr
block:
- name: down containers
shell:
cmd: docker-compose -f /etc/keycloak-compose/docker-compose.yaml down
cmd: docker-compose -f /etc/keycloak-docker/docker-compose.yaml down
- name: up containers
shell:
cmd: docker-compose -f /etc/keycloak-compose/docker-compose.yaml up -d
cmd: docker-compose -f /etc/keycloak-docker/docker-compose.yaml up -d