我安装了 DigitalOcean 工具并想要初始化它。关于https://github.com/digitalocean/doctl#authenticating-with-digitalocean ,
描述如下,输入doctl auth init
会提示文字:
DigitalOcean access token: your_DO_token
有没有办法通过 Ansible 输入 token ?
最佳答案
在 very next paragraph under the one you linked to它说:
The
--access-token
flag orDIGITALOCEAN_ACCESS_TOKEN
variable are acknowledged
所以大概:
- command: doctl compute droplet list
environment:
DIGITALOCEAN_ACCESS_TOKEN: your_DO_token
关于ansible - 如何进入Digital Ocean代币?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/60530142/