Adaz
Adaz copied to clipboard
Allow dynamically specifying a resource group name
It looks like AZURE_RESOURCE_GROUPS doesn't actually restrict the set of hosts considered by the AzureRM inventory plugin
This is actually not supported by the azure dynamic inventory plugin for Ansible: https://github.com/ansible/ansible/issues/69949
Options:
- Use the old
azurerm_inventory.py
script provided by Ansible, which is deprecated but supports runtime configuration via an environment variable - Set the name of the resource group in
domain.yml
and read it from both Terraform and Ansible - Keep as-is and duplicate the resource group name
- Include all resource groups (
["*"]
) in the configuration of the current dynamic inventory, which might end up hitting unwanted machines
discussion moved to https://github.com/ansible-collections/azure/issues/152