如何进入数字海洋令牌?

How to enter the Digital Ocean token?

我安装了 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 中说:

The --access-token flag or DIGITALOCEAN_ACCESS_TOKEN variable are acknowledged

所以大概是:

    - command: doctl compute droplet list
      environment:
        DIGITALOCEAN_ACCESS_TOKEN: your_DO_token