# mindxdl组件在k8s中使用的命名空间,请勿修改
MINDXDL_NAMESPACE: "mindx-dl"

# mindx user请勿修改
MINDX_USER: hwMindX
MINDX_USER_ID: 9000
MINDX_GROUP: hwMindX
MINDX_GROUP_ID: 9000

# HwHiAiUser group请勿修改
HIAI_GROUP: HwHiAiUser

# 离线资源包路径
host_count: "{{ ansible_play_hosts_all | length }}"
first_host: "{{ ansible_play_hosts_all[0] }}"
no_copy_flag: "{{ NO_COPY | default('false') }}"
scale: "{{ SCALE | default('false') }}"
use_mindxdl: "{{ SCENE_NUM != 4 }}"
ascend_deployer_work_dir: "{{ ansible_config_file | dirname }}"
resource_dir: "{{ ascend_deployer_work_dir }}/resources"
resource_path: "~/resources"
resources_dir: "~/resources"

docker_daemonfile_path: "/etc/docker/daemon.json"

# 安装组件名称列表
DOCKER_COMPONENT: "docker"
K8S_COMPONENT: "k8s"
DOCKER_RUNTIME_COMPONENT: "docker-runtime"
DEVICE_PLUGIN_COMPONENT: "device-plugin"
VOLCANO_COMPONENT: "volcano"
NODED_COMPONENT: "noded"
NPU_EXPORTER_COMPONENT: "npu-exporter"
ASCEND_OPERATOR: "ascend-operator"
RESILIENCE_CONTROLLER: "resilience-controller"
CLUSTERD: "clusterd"
SCENES: {
          1: ["{{DOCKER_COMPONENT}}", "{{K8S_COMPONENT}}", "{{DOCKER_RUNTIME_COMPONENT}}", "{{DEVICE_PLUGIN_COMPONENT}}",
              "{{VOLCANO_COMPONENT}}", "{{NODED_COMPONENT}}", "{{NPU_EXPORTER_COMPONENT}}",
              "{{ASCEND_OPERATOR}}", "{{RESILIENCE_CONTROLLER}}", "{{CLUSTERD}}"],
          2: ["{{DOCKER_RUNTIME_COMPONENT}}", "{{DEVICE_PLUGIN_COMPONENT}}", "{{VOLCANO_COMPONENT}}"],
          3: ["{{DOCKER_RUNTIME_COMPONENT}}", "{{DEVICE_PLUGIN_COMPONENT}}"],
          4: ["{{DOCKER_COMPONENT}}", "{{K8S_COMPONENT}}"]
}

NO_DOCKER_K8S_SCENES: [2, 3]
SCENE_NUM: 1
EXTRA_COMPONENT: ""
NODE_NAME: "{{ set_hostname if set_hostname is defined else ansible_hostname }}"

# NPU
user: HwHiAiUser
group: HwHiAiUser
install_path: /usr/local/Ascend

# K8S
in_k8s_group: "{{ inventory_hostname in groups['master'] or inventory_hostname in groups['worker'] }}"