ansible-collections/azure 请求错误'。详细信息:必须定义至少一个系统池

ansible-collections/azure aks Bad Request'. Details: Must define at least one system pool

我正在使用 ansible-collections/azure 并且出现了这个错误:基本上我需要定义至少一个系统池。但是没有它的例子,它给出了我所做的每一次尝试的错误。

20-04-01 API 是我用于此自动化的版本。
我关注此链接。 https://docs.microsoft.com/en-us/azure/templates/microsoft.containerservice/managedclusters

https://github.com/ansible-collections/azure

如果有人能帮助我,那就太好了!

The full traceback is:
  File "/tmp/ansible_azure.azcollection.azure_rm_aks_payload_6b2sjfcj/ansible_azure.azcollection.azure_rm_aks_payload.zip/ansible_collections/azure/azcollection/plugins/modules/azure_rm_aks.py", line 791, in create_update_aks
  File "/usr/local/lib/python3.5/dist-packages/azure/mgmt/containerservice/v2020_04_01/operations/_managed_clusters_operations.py", line 670, in create_or_update
    **operation_config
  File "/usr/local/lib/python3.5/dist-packages/azure/mgmt/containerservice/v2020_04_01/operations/_managed_clusters_operations.py", line 621, in _create_or_update_initial
    raise exp
[WARNING]: Azure API profile latest does not define an entry for ContainerServiceClient
fatal: [127.0.0.1]: FAILED! => {
    "changed": false,
    "invocation": {
        "module_args": {
            "aad_profile": null,
            "ad_user": null,
            "addon": null,
            "adfs_authority_url": null,
            "agent_pool_profiles": [
                {
                    "count": 2,
                    "dns_prefix": null,
                    "enable_auto_scaling": null,
                    "max_count": null,
                    "min_count": null,
                    "name": "default",
                    "os_disk_size_gb": null,
                    "os_type": null,
                    "ports": null,
                    "storage_profiles": null,
                    "type": "VirtualMachineScaleSets",
                    "vm_size": "Standard_D2_v2",
                    "vnet_subnet_id": null
                }
            ],
            "api_profile": "latest",
            "append_tags": true,
            "auth_source": null,
            "cert_validation_mode": null,
            "client_id": null,
            "cloud_environment": "AzureCloud",
            "dns_prefix": "myaks1",
            "enable_rbac": true,
            "kubernetes_version": "1.16.9",
            "linux_profile": {
                "admin_username": "azureuser",
                "ssh_key": "VALUE_SPECIFIED_IN_NO_LOG_PARAMETER"
            },
            "location": "uksouth",
            "name": "myaks",
            "network_profile": null,
            "node_resource_group": "nodetest",
            "password": null,
            "profile": null,
            "resource_group": "mytest",
            "secret": null,
            "service_principal": {
                "client_id": "VALUE_SPECIFIED_IN_NO_LOG_PARAMETER",
                "client_secret": "VALUE_SPECIFIED_IN_NO_LOG_PARAMETER"
            },
            "state": "present",
            "subscription_id": null,
            "tags": {
                "Environment": "Production"
            },
            "tenant": null
        }
    },
    "msg": "Error creating the AKS instance: Operation failed with status: 'Bad Request'. Details: Must define at least one system pool."
}

这个版本的API版本需要提供一个agentPoolMode。

代理池模式

A​​gentPoolMode 表示代理池的模式。 名称 类型 描述 系统字符串 用户字符串

https://docs.microsoft.com/en-us/rest/api/aks/agentpools/get

A​​KS 至少需要一个系统代理节点池

它已通过新的拉取请求修复,我在本地进行了测试。

https://github.com/ansible-collections/azure/pull/170