# Basic Workspace Server Configuration
# This template shows minimal server configuration using the package-based system

import provisioning.settings as settings
import provisioning.server as server
import provisioning.defaults as defaults

# Main workspace settings
workspace_settings: settings.Settings = {
    main_name = "basic-workspace"
    main_title = "Basic Infrastructure Workspace"

    # Configure workspace-relative paths
    settings_path = "./data/settings.yaml"
    defaults_provs_dirpath = "./defs"
    prov_data_dirpath = "./data"
    created_taskservs_dirpath = "./tmp/deployment"
    prov_resources_path = "./resources"

    # Cluster settings
    cluster_admin_host = ""  # Set by provider
    servers_wait_started = 30

    runset = {
        wait = True
        output_format = "human"
        output_path = "tmp/deployment"
        inventory_file = "./inventory.yaml"
        use_time = True
    }
}

# Basic server definition
basic_servers: [server.Server] = [
    {
        hostname = "app-01"
        title = "Application Server 01"

        # Inherit defaults
        time_zone = "UTC"
        running_wait = 10
        running_timeout = 200
        storage_os_find = "name: debian-12 | arch: x86_64"

        # Network configuration
        network_utility_ipv4 = True
        network_public_ipv4 = True

        # User settings
        user = "admin"
        user_ssh_port = 22
        fix_local_hosts = True
        labels = "env: development, tier: basic"
    }
]

# Export for provisioning system
{
    settings = workspace_settings
    servers = basic_servers
}
