Open Gianlu opened 11 months ago
@Gianlu Thank you for the contribution. I tried locally and its a good usecase.
@Gevorg-Khachatryan-97 Please can you verify this once :
Currently moving it to 1.9.1 -> 1.9.2, as we are near to release.
Thanks.
@Gianlu / @Gevorg-Khachatryan-97 Can you please raise a Github issue with reference docs. Thanks
@Gianlu Can we can add more examples for this ? Inside examples folder.
Thanks
Hi @bhati-pradeep,
I'm sorry for the delay. I pushed a commit where I modify your inventory example with the hostnames
modification.
I hope we can target 1.9.2 release.
Let me know if you want further modifications.
Hi, I added the support of the "hostnames" key in inventory definition. In the hostname key, you may specify a Jinja2 template that modifies the ansible_hostname. For example, I use this option in order to convert vm name in lower case.
With this patch you have to specify the property as returned by Prism Central REST API; perhaps it will be more simple if you use the object you add to ansible inventory but it seems a bit of refactoring is needed.
Hope it helps,
Thanks