Toggle menu
Toggle preferences menu
Toggle personal menu
Not logged in
Your IP address will be publicly visible if you make any edits.

TELEICU/Path A: Ansible Pull: Difference between revisions

From OHC Network Wiki
More languages
Content deleted Content added
Create TELEICU Path A: Ansible Pull guide (via create-page on MediaWiki MCP Server)
 
Fix Mermaid diagrams: remove <pre> wrapping so parser functions execute (via update-page on MediaWiki MCP Server)
 
(2 intermediate revisions by the same user not shown)
Line 12: Line 12:
All node configuration is declared in a central git repository. Each hospital PC runs <code>ansible-pull</code> on a cron or systemd timer, checking out the repo and applying the playbook for its host group.
All node configuration is declared in a central git repository. Each hospital PC runs <code>ansible-pull</code> on a cron or systemd timer, checking out the repo and applying the playbook for its host group.


{{#mermaid:flowchart LR
syntaxhighlight lang="text"
REPO["Git Repository<br/>(central playbooks)"]
┌──────────────────────┐
CP["CP Node(s)<br/>(ansible-pull)"]
│ Git repository │
SPOKE["Spoke Agent Node<br/>ansible-pull<br/>→ K3s agent<br/>→ middleware"]
│ (central playbooks) │
HUB["Hub Agent Node<br/>ansible-pull<br/>→ K3s agent<br/>→ middleware"]
└──────────┬───────────┘

pull (HTTPS / Tailscale)
REPO -->|"pull (HTTPS / Tailscale)"| CP
REPO -->|"per-agent pull"| SPOKE
┌──────────────────────┐
REPO -->|"per-agent pull"| HUB
│ CP node(s) │
}}
│ (ansible-pull │
│ also runs here) │
└──────────┬───────────┘
▼ (per-agent pull)
┌──────────────────────┐ ┌──────────────────────┐
│ Spoke agent node │ │ Hub agent node │
│ ansible-pull │ │ ansible-pull │
│ → K3s agent │ │ → K3s agent │
│ → middleware │ │ → middleware │
└──────────────────────┘ └──────────────────────┘
syntaxhighlight


== What Ansible manages ==
== What Ansible manages ==
Line 69: Line 58:
== Repository structure ==
== Repository structure ==


{{#mermaid:flowchart LR
syntaxhighlight lang="text"
ansible-teleicu/
subgraph Repo["ansible-teleicu/"]
ROOT["site.yml<br/>ansible.cfg"]
├── site.yml # master playbook
INV["inventories/<br/>production/<br/>staging/"]
├── ansible.cfg
ROLES["roles/<br/>common/<br/>tailscale/<br/>k3s-agent/<br/>cloudflared/<br/>monitoring-agent/<br/>middleware/<br/>security-patches/"]
├── requirements.yml
VARS["group_vars/<br/>all.yml<br/>spokes.yml<br/>hubs.yml"]
├── inventories/
VAULT["vault/"]
│ ├── production/
end
│ │ ├── hosts.ini # grouped by state, role
}}
│ │ └── group_vars/

│ └── staging/
{{Navbox TELEICU}}
├── roles/
│ ├── common/ # base hardening
│ ├── tailscale/ # tailscale install & bringup
│ ├── k3s-agent/ # join cluster
│ ├── cloudflared/ # tunnel service
│ ├── monitoring-agent/ # vmagent + downtime classifier
│ ├── middleware/ # docker compose or k3s manifest apply
│ └── security-patches/ # unattended-upgrades / apt pinning
├── group_vars/
│ ├── all.yml
│ ├── spokes.yml
│ └── hubs.yml
└── vault/ # encrypted secrets
syntaxhighlight


{{Related}}
{{Related}}