我已经安装了DigitalOcean工具,并希望对其进行初始化。在https://github.com/digitalocean/doctl#authenticating-with-digitalocean上,它的描述如下,输入doctl auth init
,将提示文本:
DigitalOcean access token: your_DO_token
是否可以通过Ansible输入令牌?
在very next paragraph under the one you linked to中说:
确认
--access-token
标志或DIGITALOCEAN_ACCESS_TOKEN
变量
大概是:
- command: doctl compute droplet list
environment:
DIGITALOCEAN_ACCESS_TOKEN: your_DO_token