Reputation: 25
I am using Ansible Automation Platform and trying to import hosts from Azure. When I click on sync I get the warning: Failed to parse /runner/inventory/azure_rm.yml with auto plugin.
I have added "azure.azcollection" to my requirements file in my Git project and syncd it in AAP. I have also run "ansible-galaxy collection install azure.azcollection" on the Ansible server. In AAP > Inventories, I have a inventory with a source configured using the source "Microsoft Azure Resource Manager" with a valid credential connecting to the correct subscription id. In the source variables I have added "plugin: azure.azcollection.azure_rm".
I have gone through the RedHat docs several times but it does not explain what goes into the azure_rm.yml and more importantly, where the file is supposed to go.
Upvotes: 0
Views: 530
Reputation: 1
Have you created a 'Service Principal' with Contributor permissions to your Subscription in Azure? https://learn.microsoft.com/en-us/azure/developer/ansible/create-ansible-service-principal?tabs=azure-cli
You should need: SubID TenantID ClientID [comes from registering AAP in Azure] Client Secret [comes from registering AAP in Azure]
I also registered AAP in Azure as a App but idk if that was necessary.
Upvotes: 0
Reputation: 24
have you looked at the documentation in https://docs.ansible.com/automation-controller/latest/html/userguide/inventories.html#ug-source-azure ? you have to create an azure credential, an inventory then sync the inventory to azure. This will give you more details on what exactly is the issue. You can do all of this in the UI without doing pretty much anything else. I don't know what version of AAP you are using to further help more.
Upvotes: 0