stolostron / ansible-collection.core

OCM/ACM Ansible Collection
Apache License 2.0
19 stars 13 forks source link

Implement Constructable inventory features #172

Open philipsd6 opened 1 year ago

philipsd6 commented 1 year ago

This adds support for the Constructable inventory features, addressing issue #171. Currently it adds the following data from the results of the ManagedCluster API call:

With this, you could for example add the following to an inventory.yml file:

compose:
  openshift_api: client_config.url
keyed_groups:
  - prefix: env
    key: labels.env

Let me know if you'd like me to continue working on this!

openshift-ci[bot] commented 1 year ago

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by: philipsd6 Once this PR has been reviewed and has the lgtm label, please assign therealhaoliu for approval. For more information see the Kubernetes Code Review Process.

The full list of commands accepted by this bot can be found here.

Needs approval from an approver in each of these files: - **[OWNERS](https://github.com/stolostron/ansible-collection.core/blob/main/OWNERS)** Approvers can indicate their approval by writing `/approve` in a comment Approvers can cancel approval by writing `/approve cancel` in a comment
cdoan1 commented 1 year ago

@philipsd6 thanks for this, will enable this today

philipsd6 commented 1 year ago

My latest changes are quite extensive and opinionated! It should be backwards compatible, but now you can choose to NOT name your cluster_groups, and instead rely on Constructable features to group.