The v2.18 image's entrypoint runs the setup wizard on first boot. Without the SEMAPHORE_ADMIN_* variables it prompts on stdin, fails with 'Username cannot be empty', and the container exits — leading to a crash loop. Set: SEMAPHORE_ADMIN=admin SEMAPHORE_ADMIN_NAME=Administrator SEMAPHORE_ADMIN_EMAIL=admin@local.mk-labs.cloud SEMAPHORE_ADMIN_PASSWORD={{ vault_semaphore_admin_password }} SEMAPHORE_PLAYBOOK_PATH=/var/lib/semaphore/playbooks The env-var bootstrap path is stable in v2.x; only the legacy 'semaphore user add' CLI invocation was unreliable. Drop the manual user-add step from the README.
27 lines
1.1 KiB
YAML
27 lines
1.1 KiB
YAML
---
|
|
# ============================================================================
|
|
# Post-deploy verification
|
|
# ----------------------------------------------------------------------------
|
|
# Polls the local Semaphore port until it responds. Fails loudly if the
|
|
# service doesn't come up — the operator should not get an "all green"
|
|
# playbook result while Semaphore is silently broken.
|
|
# ============================================================================
|
|
|
|
- name: Wait for Semaphore HTTP endpoint
|
|
ansible.builtin.uri:
|
|
url: "http://127.0.0.1:{{ semaphore_listen_port }}/api/ping"
|
|
status_code: [200, 201, 204]
|
|
return_content: false
|
|
register: semaphore_ping
|
|
until: semaphore_ping.status in [200, 201, 204]
|
|
retries: "{{ semaphore_health_check_retries }}"
|
|
delay: "{{ semaphore_health_check_delay }}"
|
|
|
|
- name: Report Semaphore status
|
|
ansible.builtin.debug:
|
|
msg: >-
|
|
Semaphore is reachable on http://127.0.0.1:{{ semaphore_listen_port }}.
|
|
Public URL: {{ semaphore_web_url }}.
|
|
Admin user 'admin' is provisioned automatically on first boot using
|
|
vault_semaphore_admin_password.
|