Closed djuber closed 3 years ago
Normal operation would suggest doctl auth init
would prompt for an access token.
~$ doctl auth init
Please authenticate doctl for use with your DigitalOcean account. You can generate a token in the control panel at https://cloud.digitalocean.com/account/api/tokens
Enter your access token:
It seems odd we would need to pass the token explicitly on the command line (rather than interactively). In both cases the auth init command will validate by making a network request GET https://api.digitalocean.com/v2/account
(which should not receive a 401 auth error) and report success/failure.
I think the original situation with the reporter was that a --context was given when creating the auth token, and doctl auth switch
was not used prior to calling ansible-playbook.
~clarify that "pass the api token" digital ocean is done via a command line switch --access-token~
Update documentation to clarify auth init behavior if a --context arg was passed requires auth switch prior to using ansible next.