How to import Machines names with added hash value using the Azure Inventory Source in Ansible Automation Platform
Environment
- Ansible Automation Platform 2.X.
- Microsoft Azure Resource Manager inventory plugin
Issue
- The imported machines by using the Azure Inventory Source have hash part added to the name HOSTNAME_HASH
Resolution
- Edit the Microsoft Azure Resource Manager inventory source and add the following to Source variables :
plain_host_names: true
Root Cause
- Azure often doesn't provide a globally-unique filename, so use resource name + a chunk of ID hash.
Diagnostic Steps
1) Check the current imported machines name :
Machine name on Azure : HOSTNAME
Machine name imported to AAP : HOSTNAME_cfcd
2) Inventory source sync job :
DEBUG Host "HOSTNAME_cfcd" added
This solution is part of Red Hat’s fast-track publication program, providing a huge library of solutions that Red Hat engineers have created while supporting our customers. To give you the knowledge you need the instant it becomes available, these articles may be presented in a raw and unedited form.
Comments