Complete rewrite of the semaphore role. Supersedes three prior
iterations whose admin-user-creation logic was unreliable across
Semaphore CLI versions.
Architecture:
- Rootful Podman Quadlet under /etc/containers/systemd/
- Separate PostgreSQL 16-alpine container on a user-defined
podman network (semaphore-net)
- Named volumes for both data stores (semaphore_data,
semaphore_postgres_data) so container recreation is
non-destructive
- Pinned image tags: semaphoreui/semaphore:v2.18.5-ansible2.16.5
and postgres:16-alpine
- Post-deploy HTTP health check fails the playbook if Semaphore
doesn't respond on /api/ping within ~60s
Admin user creation remains intentionally manual after first deploy;
the role README documents the exact podman exec command.
Removes the duplicate deploy_semaphore.yml and the now-unneeded
cleanup_semaphore.yml; day1_deploy_semaphore.yml is the canonical
entry point.
22 lines
865 B
YAML
22 lines
865 B
YAML
---
|
|
# ============================================================================
|
|
# Podman network
|
|
# ----------------------------------------------------------------------------
|
|
# Quadlet supports .network files, but for a single user-defined network
|
|
# we keep it simple with an idempotent podman CLI invocation. The network
|
|
# survives container removal; only re-created if missing.
|
|
# ============================================================================
|
|
|
|
- name: Check if semaphore network exists
|
|
ansible.builtin.command:
|
|
cmd: "podman network exists {{ semaphore_network_name }}"
|
|
register: semaphore_network_check
|
|
failed_when: false
|
|
changed_when: false
|
|
|
|
- name: Create semaphore podman network
|
|
ansible.builtin.command:
|
|
cmd: "podman network create {{ semaphore_network_name }}"
|
|
when: semaphore_network_check.rc != 0
|
|
changed_when: true
|