redhat-cop / redhat-cop/openshift_virtualization_migration

Add capability to generate dynamic inventory per target cluster

Open
#45 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
YAML
Stars
9
Forks
12
Avg merge
3d 59m
Merged PRs (30d)
20

Description

Overview

We need to add a feature or role to our openshift virtualization migration collection that provides the ability to dynamically generate an Ansible inventory of all Virtual Machines deployed within a specific target OpenShift cluster.

Problem Statement

Currently, setting up an inventory using the redhat.openshift.openshift_virtualization plugin requires manual configuration and lacks a standardized, automated way within our collection to scope the inventory to a specific cluster context. To scale our Migration Factory workflows, the collection needs to inherently support generating or templating inventories targeted at a specific cluster.

Proposed Solution

Introduce a mechanism (such as a dedicated role, playbook, or inventory template) within the collection that automates the generation of a cluster-specific inventory.

The implementation should:

  • Allow specifying a target cluster's connection details as variables.
  • Generate a functional inventory configuration using the redhat.openshift.openshift_virtualization plugin tailored to that specific cluster.
  • Provide clean mapping so that the resulting inventory accurately reflects all OpenShift Virtualization workloads (VMs/VMIs) running on that specific cluster.

Technical Requirements

  • Create a role or template within the collection to output/handle cluster-scoped dynamic inventory configurations.
  • Ensure it integrates seamlessly with AAP (Ansible Automation Platform) credential types for OpenShift/Kubernetes clusters.

Acceptance Criteria

  • The collection includes a structured way (role or template) to generate an inventory for a specific OpenShift cluster.
  • The generated inventory successfully targets only the VMs running on the defined cluster.
  • Documentation and an example playbook are provided within the repository showing how to generate a cluster-specific inventory.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by inspecting the collection's existing roles and the redhat.openshift.openshift_virtualization plugin configuration. Determine how target-cluster connection details and AAP OpenShift/Kubernetes credentials are represented. Done means a cluster-scoped inventory mechanism, documentation, and an example playbook that expose only the target cluster's VMs.

Written by the indexing model from the issue text.

Assessment

Tech stack
ansible, kubernetes
Domain
devops, infrastructure
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Quiet
Clarity
Mostly clear
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.