Ansible & OpenShift Automation

by rlopez133

Not rated
GitHub

About

Provides tools to interact with the Ansible Automation Platform API for automation tasks.

Details

Author
rlopez133
Categories
Developer Tools, Infrastructure, Automation

Setup of the Environment for the AI Powered Ansible & OpenShift Automation with Model Context Protocols (MCP) Servers

This guide will walk you through setting up the MCP Servers + Claude Desktop portions of the demo that focused on using Claude Desktop to interact with your Ansible Automation Platform and OpenShift Cluster environments.

Ensure you have the following installed.

- An Ansible Automation Platform (AAP) environment
- An OpenShift Cluster with OpenShift Virtualization
- Claude Desktopinstalled on your laptop (Pro Plan required for best results)
- Python 3.10 or higher installed on your laptop
- Ensure you are authenticated with your OpenShift cluster (e.g. exporting kubeconfig)

Installuvand setup your Python project and environment.

curl -LsSf https://astral.sh/uv/install.sh | sh

Installjbangwhich will be used when using the Kubernetes MCP Server. (jbang needs to be installed globally, recommend using the homebrew install pattern. If you install it locally (the curl pattern), Claude won't be able to access it).

Restart your terminal to ensure that theuvandjbangcommand are now available.

# Create a new directory for our project uv init ansible cd ansible # Create virtual environment and activate it uv venv source .venv/bin/activate # Install dependencies uv add "mcp[cli]" httpx # Create our server file touch ansible.py

Setup of the Environment for the AI Powered Ansible & OpenShift Automation with Model Context Protocols (MCP) Servers

This guide will walk you through setting up the MCP Servers + Claude Desktop portions of the demo that focused on using Claude Desktop to interact with your Ansible Automation Platform and OpenShift Cluster environments.

Ensure you have the following installed.

- An Ansible Automation Platform (AAP) environment
- An OpenShift Cluster with OpenShift Virtualization
- Claude Desktopinstalled on your laptop (Pro Plan required for best results)
- Python 3.10 or higher installed on your laptop
- Ensure you are authenticated with your OpenShift cluster (e.g. exporting kubeconfig)

Installuvand setup your Python project and environment.

curl -LsSf https://astral.sh/uv/install.sh | sh

Installjbangwhich will be used when using the Kubernetes MCP Server. (jbang needs to be installed globally, recommend using the homebrew install pattern. If you install it locally (the curl pattern), Claude won't be able to access it).

Restart your terminal to ensure that theuvandjbangcommand are now available.

# Create a new directory for our project uv init ansible cd ansible # Create virtual environment and activate it uv venv source .venv/bin/activate # Install dependencies uv add "mcp[cli]" httpx # Create our server file touch ansible.py
No reviews yet — be the first

Sign in to leave a review

Use Google, GitHub, or an email account so ratings stay tied to real people.

Email sign in

No reviews posted yet.