【问题标题】:How do I set "audience or resource" for Ansible module azure.azcollection.azure_rm_networkinterface_info?如何为 Ansible 模块 azure.azcollection.azure_rm_networkinterface_info 设置“受众或资源”?
【发布时间】:2022-06-13 02:54:47
【问题描述】:

我在 Ansible 2.10 中使用 azure.azcollection.azure_rm_networkinterface_info 模块。

这个玩法很简单,只是调用没有选项的模块,以获取所有接口的信息。凭证文件如下所示:

[default]
subscription_id=$(ARM_SUBSCRIPTION_ID)
client_id=$(ARM_CLIENT_ID)
secret=$(ARM_CLIENT_SECRET)
tenant=$(ARM_TENANT_ID)
cloud_environment=AzureUSGovernment

我实际上并不知道这些值是什么,因为它们在 Azure KeyVault 中。

调用返回以下错误:

Message: The access token has been obtained for wrong audience or resource 
'https://management.azure.com'. It should exactly match with one of the allowed audiences 'https://management.core.usgovcloudapi.net/', https://management.core.usgovcloudapi.net', 'https://management.usgovcloudapi.net/', https://management.usgovcloudapi.net'.",

我不知道如何设置该受众或资源。

更新:

此问题仅出现在 AzureDevOps 管道代理中。

它在我的 RHEL8 虚拟机上运行良好。

【问题讨论】:

标签: azure ansible


猜你喜欢
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 2016-03-26
  • 1970-01-01
  • 1970-01-01
  • 2018-06-13
  • 2021-06-27
  • 1970-01-01
相关资源
最近更新 更多