Ansible playbooks and configurations for deploying OpenClaw-based AI agents on GCP.
| Agent | VM | Project | Zone | Env | Role |
|---|---|---|---|---|---|
| IrishEcho MasterControl | mastercontrol-001-prd |
awanmasterpiece |
asia-southeast2-b |
prd | Control Plane |
| RandomBot (RandomOps) | randomops-bot-001-stg |
awanmasterpiece |
asia-southeast2-a |
stg | DevOps Worker |
| NexusChiefCommander | nexus-chief-001-stg |
ai-core-system-bot-stg |
asia-southeast2-a |
stg | Control Plane |
| NexusChiefCommander | nexus-chief-001-prd |
ai-core-system-bot-prd |
asia-southeast2-b |
prd | Control Plane |
ansible/
βββ inventory/
β βββ mastercontrol/ # IrishEcho MasterControl
β βββ randomops/ # RandomBot Worker
β βββ stg/
β β βββ nexus-chief/ # NexusChiefCommander (Staging)
β β βββ hosts.yml
β β βββ gcp_compute.yml
β β βββ group_vars/all/
β β βββ main.yml
β β βββ openclaw.yml
β β βββ owner.yml
β β βββ gcp.yml
β β βββ vault.yml
β βββ prd/
β β βββ nexus-chief/ # NexusChiefCommander (Production)
β β βββ hosts.yml
β β βββ gcp_compute.yml
β β βββ group_vars/all/
β β βββ main.yml
β β βββ openclaw.yml
β β βββ owner.yml
β β βββ gcp.yml
β β βββ vault.yml
β βββ production/ # Legacy production
β βββ staging/ # Legacy staging
βββ playbooks/
β βββ provision/ # VM provisioning
β βββ deploy/ # Service deployment
β βββ mastercontrol/ # MasterControl specific
β βββ randomops/ # RandomOps specific
β βββ nexus-chief/ # NexusChiefCommander specific
β βββ provision.yml
β βββ deploy.yml
βββ roles/
β βββ base/ # Base OS configuration
β βββ gcp-compute/ # GCP VM provisioning
β βββ openclaw-prereq/ # Node.js & dependencies
β βββ openclaw-install/ # OpenClaw installation
β βββ openclaw-config/ # OpenClaw configuration
β βββ ollama/ # Ollama setup
βββ docs/ # Documentation
# Install Ansible
pip install ansible
# Install GCP Ansible collections
ansible-galaxy collection install google.cloud
# Install dependencies
ansible-galaxy install -r requirements.yml# 1. Provision VM
ansible-playbook playbooks/nexus-chief/provision.yml -e "deploy_env=staging"
# 2. Deploy OpenClaw + Persona
ansible-playbook playbooks/nexus-chief/deploy.yml \
-i inventory/stg/nexus-chief/ \
-e "deploy_env=staging" \
-e "vault_telegram_bot_token=$(gcloud secrets versions access latest --secret=ncc-stg-telegram-bot-token --project=ai-core-system-bot-stg)" \
-e "vault_gateway_token=$(gcloud secrets versions access latest --secret=ncc-stg-gateway-token --project=ai-core-system-bot-stg)" \
-e "vault_ollama_api_key=$(gcloud secrets versions access latest --secret=ncc-stg-ollama-api-key --project=ai-core-system-bot-stg)"# 1. Provision VM
ansible-playbook playbooks/nexus-chief/provision.yml -e "deploy_env=production"
# 2. Deploy OpenClaw + Persona
ansible-playbook playbooks/nexus-chief/deploy.yml \
-i inventory/prd/nexus-chief/ \
-e "deploy_env=production" \
-e "vault_telegram_bot_token=$(gcloud secrets versions access latest --secret=ncc-prd-telegram-bot-token --project=ai-core-system-bot-prd)" \
-e "vault_gateway_token=$(gcloud secrets versions access latest --secret=ncc-prd-gateway-token --project=ai-core-system-bot-prd)" \
-e "vault_ollama_api_key=$(gcloud secrets versions access latest --secret=ncc-prd-ollama-api-key --project=ai-core-system-bot-prd)"# Encrypt vault file
ansible-vault encrypt inventory/stg/nexus-chief/group_vars/all/vault.yml
# Deploy with vault password
ansible-playbook playbooks/nexus-chief/deploy.yml \
-i inventory/stg/nexus-chief/ \
-e "deploy_env=staging" \
--ask-vault-passSecrets are stored in GCP Secret Manager per project and environment.
gcloud config set project ai-core-system-bot-stg
echo -n "YOUR_TELEGRAM_BOT_TOKEN" | gcloud secrets create ncc-stg-telegram-bot-token --data-file=-
echo -n "$(openssl rand -hex 32)" | gcloud secrets create ncc-stg-gateway-token --data-file=-
echo -n "YOUR_OLLAMA_API_KEY" | gcloud secrets create ncc-stg-ollama-api-key --data-file=-
echo -n "YOUR_STRONG_PASSWORD" | gcloud secrets create ncc-stg-sensitive-password --data-file=-
# Grant access
for secret in ncc-stg-telegram-bot-token ncc-stg-gateway-token ncc-stg-ollama-api-key ncc-stg-sensitive-password; do
gcloud secrets add-iam-policy-binding $secret \
--member="serviceAccount:ai-core-system-bot@ai-core-system-bot-stg.iam.gserviceaccount.com" \
--role="roles/secretmanager.secretAccessor"
donegcloud config set project ai-core-system-bot-prd
echo -n "YOUR_TELEGRAM_BOT_TOKEN" | gcloud secrets create ncc-prd-telegram-bot-token --data-file=-
echo -n "$(openssl rand -hex 32)" | gcloud secrets create ncc-prd-gateway-token --data-file=-
echo -n "YOUR_OLLAMA_API_KEY" | gcloud secrets create ncc-prd-ollama-api-key --data-file=-
echo -n "YOUR_STRONG_PASSWORD" | gcloud secrets create ncc-prd-sensitive-password --data-file=-
# Grant access
for secret in ncc-prd-telegram-bot-token ncc-prd-gateway-token ncc-prd-ollama-api-key ncc-prd-sensitive-password; do
gcloud secrets add-iam-policy-binding $secret \
--member="serviceAccount:ai-core-system-bot@ai-core-system-bot-prd.iam.gserviceaccount.com" \
--role="roles/secretmanager.secretAccessor"
done# Encrypt vault file
ansible-vault encrypt inventory/stg/nexus-chief/group_vars/all/vault.yml
# Edit encrypted vault
ansible-vault edit inventory/stg/nexus-chief/group_vars/all/vault.yml
# Run with vault password
ansible-playbook playbooks/nexus-chief/deploy.yml --ask-vault-pass| Setting | Staging (STG) | Production (PRD) |
|---|---|---|
| VM Name | nexus-chief-001-stg |
nexus-chief-001-prd |
| GCP Project | ai-core-system-bot-stg |
ai-core-system-bot-prd |
| Zone | asia-southeast2-a |
asia-southeast2-b |
| Subnet | custom-vpc-dev-subnet |
custom-vpc-prod-subnet |
| Model | ollama/glm-5 |
ollama/glm-5.1 |
| Log Level | debug |
info |
| Secret Prefix | ncc-stg-* |
ncc-prd-* |
| Server | Deploy Key | Repository |
|---|---|---|
| mastercontrol-001-prd | mastercontrol-gcp |
addhe/openclaw-config-backup |
| nexus-chief-001-prd | nexus-devops-deploy |
addhe/NexusDevops |
- All bots: DM ONLY, OWNER ONLY (Om Awan, Telegram ID: 319535690)
- No group chat access by default
- Secrets via Google Secret Manager (recommended) or Ansible Vault
- SSH key-based authentication only
- Fail2ban enabled on all VMs
MIT License - Copyright (c) 2026 AddheWarmanPutra