Cloud IAP 是 Google Cloud Platform 的一种代理,可让您连接到没有公共 IP 地址的计算实例,而无需 VPN。你站起来的实例,然后就可以使用gcloud工具按名称连接到它像这样:gcloud compute ssh my-server-01。这将通过代理对您进行身份验证,并使用您自己的 Google 帐户(使用称为操作系统登录的功能)将您登录到目标服务器。
gcloud
gcloud compute ssh my-server-01
我想让 ansible 做gcloud工具正在做的事情,我需要一个自定义连接插件。
ssh ansible google-cloud
ansible ×1
google-cloud ×1
ssh ×1