- New tasks/collections.yml installs collections from defaults list into /opt/semaphore/ansible-collections on the host - semaphore.container.j2: bind-mounts that dir into the container at /home/semaphore/.ansible/collections (read-only) - defaults/main.yml: semaphore_collections_dir + semaphore_ansible_collections list (containers.podman, effectivelywild.technitium_dns) - main.yml: collections task wired in after semaphore.yml, before verify - Collections survive container restarts/rebuilds without image changes - Re-run with --tags collections to add new collections without full redeploy
46 lines
1.5 KiB
YAML
46 lines
1.5 KiB
YAML
---
|
|
# ============================================================================
|
|
# semaphore / main entrypoint
|
|
# ----------------------------------------------------------------------------
|
|
# Order matters:
|
|
# 1. Podman + Quadlet support installed and ready
|
|
# 2. Network created (containers reference it by name)
|
|
# 3. Volumes created (postgres + semaphore data)
|
|
# 4. Postgres started (Semaphore depends on it being ready)
|
|
# 5. Semaphore started (web service)
|
|
# 6. Verify reachable on listen port
|
|
# ============================================================================
|
|
|
|
- name: Install Podman and dependencies
|
|
ansible.builtin.import_tasks: podman.yml
|
|
tags: [semaphore, podman]
|
|
|
|
- name: Ensure podman network exists
|
|
ansible.builtin.import_tasks: network.yml
|
|
tags: [semaphore, network]
|
|
|
|
- name: Ensure podman volumes exist
|
|
ansible.builtin.import_tasks: volumes.yml
|
|
tags: [semaphore, volumes]
|
|
|
|
- name: Deploy PostgreSQL container
|
|
ansible.builtin.import_tasks: postgres.yml
|
|
tags: [semaphore, postgres]
|
|
|
|
- name: Deploy Semaphore container
|
|
ansible.builtin.import_tasks: semaphore.yml
|
|
tags: [semaphore]
|
|
|
|
- name: Install Ansible collections for Semaphore
|
|
ansible.builtin.import_tasks: collections.yml
|
|
tags: [semaphore, collections]
|
|
|
|
- name: Verify Semaphore is reachable
|
|
ansible.builtin.import_tasks: verify.yml
|
|
tags: [semaphore, verify]
|
|
|
|
- name: Apply Semaphore configuration (projects, keys, repos, templates)
|
|
ansible.builtin.import_tasks: configure.yml
|
|
when: semaphore_configure | default(false) | bool
|
|
tags: [semaphore, configure]
|