Files
Hermes Agent service account 80f810fb0c feat(semaphore): rewrite role with rootful Podman Quadlet + PostgreSQL
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.
2026-05-29 21:34:22 -05:00

42 lines
1.3 KiB
YAML

---
# ============================================================================
# Podman + Quadlet prerequisites
# ============================================================================
# Ubuntu 24.04 ships podman 4.9+, which has full Quadlet support. No PPAs
# needed.
# ============================================================================
- name: Install podman
ansible.builtin.apt:
name:
- podman
- uidmap
state: present
update_cache: true
cache_valid_time: 3600
- name: Ensure quadlet directory exists
ansible.builtin.file:
path: "{{ semaphore_quadlet_dir }}"
state: directory
owner: root
group: root
mode: "0755"
- name: Confirm podman is recent enough for Quadlet (>= 4.4)
block:
- name: Probe podman version
ansible.builtin.command:
cmd: podman --version
register: podman_version_raw
changed_when: false
- name: Assert podman >= 4.4
ansible.builtin.assert:
that:
- (podman_version_raw.stdout | regex_search('([0-9]+\\.[0-9]+)') | float) >= 4.4
fail_msg: >-
podman {{ podman_version_raw.stdout }} is too old for Quadlet.
Quadlet was introduced in 4.4. Upgrade podman or use the
generate-systemd fallback path.