我正在尝试将 Ansible 与 Azure Stack 一起使用。
一个奇怪的问题,我仍然在日志中得到这个:
Unable to get endpoints from the cloud. Please ensure you have
network connection. Error detail:
HTTPSConnectionPool(host='management.mystack.onstack.test.mydomain.co.uk',
port=443): Max retries exceeded with url: /metadata/endpoints?api-
version=2015-01-01 (Caused by SSLError(SSLError(1, u'[SSL:
CERTIFICATE_VERIFY_FAILED] certificate verify failed (_ssl.c:727)'),))
File "/usr/lib/python2.7/dist-packages/ansible/inventory/manager.py", line 280, in parse_source
plugin.parse(self._inventory, self._loader, source, cache=cache)
File "/usr/lib/python2.7/dist-packages/ansible/plugins/inventory/auto.py", line 58, in parse
plugin.parse(inventory, loader, path, cache=cache)
File "/usr/lib/python2.7/dist-packages/ansible/plugins/inventory/azure_rm.py", line 265, in parse
self._credential_setup()
File "/usr/lib/python2.7/dist-packages/ansible/plugins/inventory/azure_rm.py", line 286, in _credential_setup
self.azure_auth = AzureRMAuth(**auth_options)
File "/usr/lib/python2.7/dist-packages/ansible/module_utils/azure_rm_common.py", line 1185, in __init__
self.fail("cloud_environment {0} could not be resolved: {1}".format(raw_cloud_env, e.message), exception=traceback.format_exc())
File "/usr/lib/python2.7/dist-packages/ansible/module_utils/azure_rm_common.py", line 1245, in fail
self._fail_impl(msg)
File "/usr/lib/python2.7/dist-packages/ansible/module_utils/azure_rm_common.py", line 1248, in _default_fail_impl
raise AzureRMAuthException(msg)
但奇怪的是我在库存文件中设置了以下内容azure_rm.yml
:
---
plugin: azure_rm
cloud_environment: https://management.mystack.onstack.test.mydomain.co.uk
cert_validation_mode: ignore
subscription_id: mysub
tenant: mytenant
client_id: mycliid
secret: mysecret
有谁知道为什么会出现这种情况和/或解决方法?