Try this. Go to your home directory on the virtual and run this command:
find . -name “ansible” -print
That will locate any directories or files with “ansible” in them, and perhaps give you a clue as to how Ansible was installed, and where it was installed to.
If that command finds nothing, go to the root directory of your virtual and repeat the comand.
Beyond that, I’m as stumped as you. But I do know that either it was never installed, or it was installed somewhere other than you now expect. It has not uninstalled itself.
Also you have credentials, config and credentials.ini and other files as well, not sure which is what or which is correct. Suggest you move everything OUT of that directory and move them back in one at a time while testing access, to make sure you are using the correct file.
The permissions on your credentials files allow anyone with access to the computer to read the files. That means they can see your credentials and presumably access your Azure account. Hence probably not right.
From the Ansible document it specifies using CAPITALS … instead of lowercase ie. the docs specify using AZURE_SUBSCRIPTION_ID, instead of subscription_id … or am I wrong?
Not quite what I meant. When I look at that web page, it seems to me to be saying that you should have a credentials file in ~.azure called credentials, and that that file should contain the following:
… with the “xxxx” parts replaced by the correct values for your subscription ID and so on.
The exact names and the exact case of the names are almost certainly relevant. For example, I think it has to be exactly and literally “subscription_id” - not “SUBSCRIPTION_ID” or “SubscriptionId” or “AZURE_SUBSCRIPTION_ID” or anything else. The One True And Correct Name for it is “subscription_id”.
I may be wrong, but unless you have definite evidence to the contrary, it is safest to assume that the exact spelling, punctuation and case of everything in the INI file is meaningful.
… and scroll down to where it says “Providing Credentials to Azure Modules”. Then scroll down some more until you find “Storing in a File” and read that bit.
If you were using environment variables rather than a credentials file, then you would use the upper-case names with the “AZURE_” prefix, as detailed in the section called “Using Environment Variables”. Since you are storing credentials in a file, it seems to me to make sense to use the instructions in the section called “Storing in a File”.
Regards, K.
PS: This is just me reading a document describing something I know nothing about. Anyone with actual Azure experience should feel free to chime in any time…