azure icon indicating copy to clipboard operation
azure copied to clipboard

Add "osName" from MS API "instanceView" to "azure_rm.py" Inventory Plugin

Open obartonek opened this issue 11 months ago • 2 comments

SUMMARY

The current azure_rm.py plugin for Ansible inventory source supports only the osType attribute (e.g., Linux, Windows).

I would like to ask for adding the osName attribute from MS API instanceView, which provides more granular OS details (e.g., RedHat, Ubuntu, Oracle, etc.). This enhancement would enable better filtering and grouping of machines in Ansible inventories based on their specific operating system.

ISSUE TYPE
  • Feature Idea
COMPONENT NAME

azure_rm.py

ADDITIONAL INFORMATION

Adding osName would allow users to define conditional groups based on the specific operating system, providing more flexibility and precision when managing diverse environments.

plugin: azure.azcollection.azure_rm

conditional_groups:
  windows22_group: os_name == 'Windows Server 2022'
  windows19_group: os_name == 'Windows Server 2019'
  windows16_group: os_name == 'Windows Server 2016'
  redhat_group: os_name == 'RedHat' 
  oracle_group: os_name == 'Oracle'
  ubuntu_group: os_name == 'Ubuntu'

obartonek avatar Dec 04 '24 11:12 obartonek