Adaz icon indicating copy to clipboard operation
Adaz copied to clipboard

Allow dynamically specifying a resource group name

Open christophetd opened this issue 4 years ago • 3 comments

It looks like AZURE_RESOURCE_GROUPS doesn't actually restrict the set of hosts considered by the AzureRM inventory plugin

christophetd avatar Jun 05 '20 21:06 christophetd

This is actually not supported by the azure dynamic inventory plugin for Ansible: https://github.com/ansible/ansible/issues/69949

christophetd avatar Jun 08 '20 15:06 christophetd

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

christophetd avatar Jun 08 '20 15:06 christophetd

discussion moved to https://github.com/ansible-collections/azure/issues/152

christophetd avatar Feb 21 '22 20:02 christophetd