Playbook Tags Reference#
The main playbook pb_all.yml uses tags to allow running individual stages or
combinations. Tags map to plays within the playbook.
Tag reference#
Tag |
Play |
Roles |
Runs on |
Description |
|---|---|---|---|---|
|
Install client tools |
|
localhost |
Installs helm, kubectl, kubeseal, scripts |
|
Bare metal provisioning |
|
turing_pis |
Flashes Ubuntu to compute modules (BMC) |
|
Update known_hosts |
|
all_nodes, turing_pis |
Updates SSH known_hosts (serial: 1) |
|
Prepare nodes |
|
all_nodes |
OS migration, dist-upgrade, dependencies |
|
Install K3s |
|
all_nodes |
Installs K3s control plane + workers |
|
Deploy services |
|
localhost |
Installs ArgoCD, bootstraps services |
Running individual stages#
# Single stage
ansible-playbook pb_all.yml --tags tools
ansible-playbook pb_all.yml --tags k3s
# Multiple stages
ansible-playbook pb_all.yml --tags k3s,cluster
# Skip a stage
ansible-playbook pb_all.yml --skip-tags flash
Common tag combinations#
Command |
Use case |
|---|---|
|
Update CLI tools in devcontainer |
|
Full setup without flashing (pre-existing servers) |
|
Rebuild K3s and all services |
|
Redeploy ArgoCD and services only |
|
Force reinstall ArgoCD |
|
Full run including flash (no tag needed — runs all) |
Using --limit#
Restrict which hosts are targeted:
# Single node
ansible-playbook pb_all.yml --limit node03 --tags k3s -e k3s_force=true
# Turing Pi BMC + specific node (needed for flash)
ansible-playbook pb_all.yml --limit turingpi,node03 -e flash_force=true
# Only extra nodes
ansible-playbook pb_all.yml --limit extra_nodes --tags known_hosts,servers,k3s
Note
When using --limit with the flash tag, always include the Turing Pi BMC host
(e.g. turingpi) because the flash role runs on the BMC, not on the node itself.
Standalone playbooks#
Playbook |
Purpose |
|---|---|
|
Main playbook — runs all stages |
|
Bootstrap Ansible access on new nodes in |
Ad-hoc commands#
Run Ansible modules directly without a playbook:
# Ping all nodes
ansible all_nodes -m ping
# Run a shell command
ansible all_nodes -a "uptime" --become
# Run a single role
ansible all_nodes -m include_role -a name=known_hosts