Closed ayoub-eddafali closed 9 months ago
Would it be possible to use ansible-inventory -i inventory.ini --list
instead to get all required information from the main inventory? It would be able to handle generated inventories as we have with OpenStack environments, and also make it easier to parse and manage as it outputs in JSON so you can easily list groups and hosts.
Nit: Do try to fix the pre-commit issues, and usually with the code style we use function names should be snake_case
.
Would it be possible to use
ansible-inventory -i inventory.ini --list
instead to get all required information from the main inventory? It would be able to handle generated inventories as we have with OpenStack environments, and also make it easier to parse and manage as it outputs in JSON so you can easily list groups and hosts.
I still think this should be done within this PR to make it work with generated inventories.
Added some fixes, and tested it again on an empty exoscale kubespray cluster, and seems to be working. Would be grateful if someone could test this on his dev cluster, or a cluster with AMSes
What kind of PR is this?
Required: Mark one of the following that is applicable:
Optional: Mark one or more of the following that are applicable:
Platform Administrator notice
What does this PR do / why do we need this PR?
Managed upgrade script
Additional information to reviewers
Screenshots
Checklist
NetworkPolicy Dashboard