Spectro34/ansible-runner-mcp
If you are the rightful owner of ansible-runner-mcp and would like to certify it and/or have it hosted online, please leave a comment on the right or send an email to dayong@mcphub.com.
The Ansible Runner + Qwen 30B + MCPHost Integration provides a comprehensive solution for deploying and managing an Ollama-backed MCPHost instance with Ansible Runner and the Qwen 30B model.
WIP: Ansible Runner + Qwen 30B + MCPHost Integration
Complete automation for deploying an Ollama-backed mcphost instance bundled with the Ansible Runner MCP server and the Qwen 30B (Qwen 2.5 32B) model.
Components
deploy-qwen-ansible-runner.yml– Opinionated playbook that installs dependencies, configures GPU support, downloads the model, and wires everything together.ansible-ollama_mcphost/ansible-ollama_mcphostrole. The deployment playbook automatically installs/updates it withgit.ansible-runner-mcp/– FastMCP implementation that exposes ansible-runner capabilities as seven consolidated MCP tools.ansible-runner/– Exampleprivate_data_dirused by the MCP tools.
Requirements
- Linux host with sudo access
- Python 3.9+, Ansible 2.13+,
pip, andgit - Internet connectivity to pull the role, Ollama packages, and the Qwen model
- NVIDIA drivers +
nvidia-smiifenable_gpu: true(default)
Setup
git clone https://github.com/Spectro34/runner.git
cd runner
ansible-playbook deploy-qwen-ansible-runner.yml
mcphost
What the playbook does:
- Installs
git(if missing) and syncs the latestansible-ollama_mcphostrole - Installs Ollama + mcphost, configures GPU overrides, and pulls
qwen2.5:32b - Generates
~/.mcphost.ymlwith the Ansible Runner MCP server pre-configured - Verifies Ollama, mcphost, and performs smoke checks on the MCP server
Adjust behaviour with -e extra vars:
ansible-playbook deploy-qwen-ansible-runner.yml \
-e ollama_model="qwen2.5:72b" \
-e mcp_servers[0].env.ANSIBLE_RUNNER_PRIVATE_DATA_DIR=/data/ansible-runner
Re-run the playbook whenever you want to pick up upstream role changes or
refresh the environment. Use --tags cleanup to uninstall packages, remove
models, and delete configuration.
After Deployment
- Start mcphost:
mcphost - mcphost uses the generated
~/.mcphost.ymlwhich referencesansible-runner-mcp/ansible_runner_mcp_fastmcp.py - The exported MCP tools include
run_job,get_job_results,manage_inventory,job_history,manage_job_template,ansible_runner_list_playbooks, andcreate_playbook - The default ansible-runner data lives in
ansible-runner/(setANSIBLE_RUNNER_PRIVATE_DATA_DIRif you relocate it)
See QUICK_START.md for a guided walkthrough and prompt examples.
Repository Layout
.
├── ansible-ollama_mcphost/ # Role synced from GitHub (managed by playbook)
├── ansible-runner/ # Example private_data_dir (inventory, templates, artifacts)
├── ansible-runner-mcp/ # FastMCP server implementation
├── deploy-qwen-ansible-runner.yml # End-to-end deployment playbook
├── QUICK_START.md # Step-by-step usage guide
└── README.md # Project overview (this file)
Maintenance Tips
- Update everything: rerun
ansible-playbook deploy-qwen-ansible-runner.yml - Clean up:
ansible-playbook deploy-qwen-ansible-runner.yml --tags cleanup - Test MCP server manually:
python3 ansible-runner-mcp/test_mcp_server.py - Customize role vars: copy defaults from
ansible-ollama_mcphost/defaults/main.ymlinto your playbook or pass via-e
License
MIT