Replaces the vendored Go exporter with two pre-built upstream images: - quay.io/prometheuscommunity/json-exporter:v0.7.0 maps the gateway JSON into prometheus metrics via JSONPath. The G4AR keys signal blocks as "5g" / "4g" (digit-prefixed), which the k8s client-go JSONPath dialect only reaches via bracket-with-single-quote notation. - nginxinc/nginx-unprivileged:1.27-alpine-slim sidecar rewrites GET /metrics → GET /probe?module=tmhi&target=http://192.168.12.1/... so the existing kubernetes-services scrape job picks it up over the apiserver proxy with no Prometheus-side config changes. Avoiding caddy here: its binary carries cap_net_bind_service file caps, which the kernel refuses to exec under no_new_privs as a non-root user. Dashboard "Gateway up" panel now reads up{service="tmobile-exporter"} (Prometheus's built-in scrape-success gauge) since json_exporter's /probe endpoint does not emit probe_success. |
||
|---|---|---|
| .. | ||
| .vscode | ||
| baseline/proxmox | ||
| collections | ||
| group_vars | ||
| host_vars | ||
| roles | ||
| scripts | ||
| vars | ||
| .ansible-lint | ||
| .DS_Store | ||
| .gitignore | ||
| ansible-bootstrap.cfg | ||
| ansible.cfg | ||
| bootstrap-hosts | ||
| bootstrap.sh | ||
| bootstrap.yml | ||
| CLAUDE.md | ||
| hosts | ||
| LICENSE.md | ||
| Makefile | ||
| netbox.yml | ||
| notes.txt | ||
| playbook.yml | ||
| playbook_handlers.yml | ||
| README.md | ||
| regenerate-ssh-keys.yml | ||
| requirements.yml | ||
| run.sh | ||
| setup-host.sh | ||
| update_dns.sh | ||
Ansible Infrastructure Management
This repository contains Ansible playbooks and roles for managing infrastructure across multiple environments.
Directory Structure
├── playbook.yml # Main playbook for common configuration
├── general.yml # General system setup playbook
├── bootstrap.yml # Bootstrap playbook for new hosts
├── roles/ # Ansible roles
│ ├── base/ # Base configuration (users, SSH, system)
│ ├── general/ # General system configurations
│ ├── caddy/ # Caddy web server
│ ├── ns/ # Nameserver configuration
│ ├── resolvers/ # DNS resolver setup
│ └── ... # Other roles
├── group_vars/ # Group-specific variables
├── host_vars/ # Host-specific variables
└── hosts # Inventory file
## Quick Start
### Bootstrap a new host
```bash
# For hosts with existing user access
make bootstrap-init HOSTNAME=hostname ANSIBLE_HOST=ip_address
# For hosts with only root access
make bootstrap-init-root HOSTNAME=hostname ANSIBLE_HOST=ip_address
Run playbooks
# Run main playbook
./run.sh
# Run on specific host
ansible-playbook -l hostname playbook.yml
# Run with specific tags
ansible-playbook -t caddy playbook.yml
Inventory Groups
vntx_servers- VNTX network servicesapp_servers- Application servershome_servers- Home network devicestailscale_home- Devices using Tailscale VPNcaddy_servers- Servers running Caddy web server
Key Features
- Automated user management with GitHub SSH key integration
- Base package installation across all systems
- Role-based configuration management
- Support for multiple OS families (Debian, Ubuntu, AlmaLinux)
- Tailscale VPN integration
- Caddy web server with reverse proxy configuration