- name: Setup Kokoro FastApi
  hosts: kokoro
  vars:
    podman_user: "{{ kokoro_user | default('kokoro') }}"
    podman_group: "{{ kokoro_group | default('kokoro') }}"
    podman_extra_groups: "users"
    podman_user_home: "{{ kokoro_home | default('/home/kokoro') }}"
    podman_user_pubkey: "{{ kokoro_user_pubkey | default(omit) }}"
    podman_user_folders:
      - data
    pods:
      - name: kokoro
        repo:
          image: ghcr.io/remsky/kokoro-fastapi-gpu
        ports:
          - "0.0.0.0:{{ kokoro_port | default(8880) }}:8880/tcp"
        device:
          - "nvidia.com/gpu=all"

  tasks:
    - name: Setup Pods
      ansible.builtin.include_tasks:
        file: tasks/podman.yml
