# Iron Legion Fleet Inventory
# Generated: 2026-06-03
# Source: fleet documentation + live SSH config
#
# Usage with Ansible:
#   ansible all -m ping -i inventory.yml
#   ansible pve_workers -m setup -i inventory.yml
#   ansible swarm_manager -a "docker service ls" -i inventory.yml
#
# FIX: Group-specific variables (e.g. pve_workers:) were previously
# placed outside `all:` scope, breaking inventory parsing.
# All group vars are now merged into the group definitions below.

---

all:
  vars:
    ansible_ssh_private_key_file: /root/.ssh/id_ed25519
  children:

    # ──────────────────────────────────────────
    # Physical / Virtual Fleet Nodes
    # ──────────────────────────────────────────

    fleet_nodes:
      children:

        # Core fleet services
        core_services:
          hosts:
            mk7:
              ansible_host: 192.168.7.7
              ansible_user: jarvis
              node_role: swarm_manager
              docker_host: true
              description: "Swarm manager + Traefik + service stack host"

        # PVE hosts nodes
        pve_hosts:
          vars:
            ansible_user: root
            ansible_ssh_pass: "proxmox12"
            ansible_become: true
            ansible_python_interpreter: /usr/bin/python3
          hosts:
            mk33:
              ansible_host: 192.168.7.33
              node_role: pve_worker
              pve_api_url: "https://192.168.7.33:8006/"
              description: "PVE Silver Centurion"

            mk34:
              ansible_host: 192.168.7.34
              node_role: pve_worker
              pve_api_url: "https://192.168.7.34:8006/"
              description: "PVE Southpaw"

            mk39:
              ansible_host: 192.168.7.39
              node_role: pve_worker
              pve_api_url: "https://192.168.7.39:8006/"
              description: "PVE Gemini"

            mk50:
              ansible_host: 192.168.50.41
              node_role: pve_worker
              pve_api_url: "https://192.168.50.41:8006/"
              description: "PVE MK50 Bleeding Edge"

        # Active physical agents
        physical_agents:
          hosts:
            artemis:
              ansible_host: 192.168.15.182
              ansible_user: jarvis
              node_role: discord_gateway
              hermes_agent: true
              description: "Primary AI orchestrator + Discord gateway"

            mark44:
              ansible_host: 192.168.5.214
              ansible_user: jarvis
              ansible_ssh_private_key_file: /root/.ssh/vscode_ed25519
              node_role: gpu_host
              gpu: true
              description: "Hulkbuster — GPU/Ollama standby"

            mark5:
              ansible_host: 192.168.6.5
              ansible_user: jarvis
              node_role: tbd
              description: "Mark 5 — being repurposed"

            mk42:
              ansible_host: 192.168.0.196
              ansible_user: jarvis
              ansible_become_pass: "ubuntu"
              node_role: swarm_worker
              description: "Swarm Extremis"

            mk85:
              ansible_host: 100.75.79.47
              ansible_user: jarvis
              node_role: mobile_gamer
              ansible_connection: ssh
              description: "Mobile Gamer — Tailscale primary, no fixed LAN"

        # Infrastructure / support nodes
        infrastructure:
          hosts:
            shield:
              ansible_host: 192.168.27.205
              ansible_user: jarvis
              ansible_become_pass: "ubuntu"
              node_role: pxe_server
              description: "iVentoy PXE deployment server"

            igor:
              ansible_host: 192.168.10.211
              ansible_user: jarvis
              node_role: nas
              description: "ZimaOS NAS (MK-38)"

      vars:
        nfs_shares:
          - src: "192.168.16.254:/mnt/Ice/Repo"
            path: "/home/jarvis/repo"

    # ──────────────────────────────────────────
    # Managed nodes (apt update/upgrade target)
    # Physical agents + core services, NOT PVE, NOT Neo, NOT igor, NOT ephemeral LXCs
    # ──────────────────────────────────────────
    managed_nodes:
      children:
        physical_agents:
        core_services:

    # Wolfstack host nodes (includes PVE hosts for now)
    wolfstack:
      children:
        pve_hosts:

    # Tailscale fallback aliases (uncomment if LAN fails)
    # tailscale_fallback:
    #   hosts:
    #     ts-mk7:
    #       ansible_host: 100.66.70.51
    #       ansible_user: jarvis
    #     ts-mk33:
    #       ansible_host: 100.125.155.41
    #       ansible_user: jarvis
    #     ts-mk34:
    #       ansible_host: 100.94.190.43
    #       ansible_user: jarvis
    #     ts-nebuchadnezzar:
    #       ansible_host: 100.99.123.16
    #       ansible_user: jarvis

    # Docker host targeting groups (uncomment when needed)
    # docker_hosts:
    #   children:
    #     swarm_manager:
    #       hosts:
    #         mk7:
    #     standalone_docker:
    #       hosts:
    #         nebuchadnezzar:
