--- # ============================================================================ # Honcho API container (Quadlet) # ---------------------------------------------------------------------------- # Runs `fastapi run src/main.py` via the image's default CMD. The # entrypoint.sh in the image runs the DB migration first; safe to do on # every restart (idempotent). # ============================================================================ - name: Deploy Honcho API Quadlet ansible.builtin.template: src: honcho-api.container.j2 dest: "{{ honcho_quadlet_dir }}/{{ honcho_container_name }}.container" owner: root group: root mode: "0644" register: honcho_api_quadlet - name: Reload systemd to pick up Quadlet changes ansible.builtin.systemd: daemon_reload: true when: honcho_api_quadlet.changed - name: Ensure Honcho API container is started and enabled ansible.builtin.systemd: name: "{{ honcho_container_name }}.service" state: started enabled: true - name: Restart Honcho API on Quadlet change ansible.builtin.systemd: name: "{{ honcho_container_name }}.service" state: restarted when: honcho_api_quadlet.changed