Nodes targeting
Running a task on a single node
The basic syntax for running a task is:
jack run <node_name> <plugin.task> [arguments...]Example:
jack run node1 health.ping
node1
→ output:
trueTargeting methods overview
Jackadi provides several ways to target multiple nodes:
1. Single node targeting
Target a specific node by name:
jack run -t node1 example.task12. List-based targeting
Target multiple specific nodes:
jack run -l "node1,node2,node3" example.task13. Pattern-based targeting
Glob Patterns (default):
jack run -g "worker-*" example.task1
jack run "web-*" example.task1 # -g is defaultRegular Expressions:
jack run -e "node[0-9]+" example.task1
jack run -e "^(web|api)-server-[0-9]{2}$" example.task14. Query targeting
The most advanced targeting method using hostname and/or specs:
Exact match
The operator for an exact match is ==.
jack run -q "id==hostname1" example.task1List of nodes
The operator for a list is ==. The elements in the list are separated by a comma.
jack run -q "id==node1,node2" example.task1Glob pattern
The operator for a glob pattern is =~.
jack run -q "id=~node*" example.task1Regex pattern
The operator for regex filtering is =~, followed by /your_regex/.
jack run -q "id=~/^node.*$/" example.task1Logical operators
You can combine multiple filters together using AND and OR.
The order of execution follows standard binary/mathematical logic: AND operations are processed before OR.
jack run -q "id==node1 AND specs.dev.hardware.Vendor==Lenovo" example.task1
jack run -q "id==node1 OR specs.dev.hardware.Type==Laptop" example.task1Using nested spec
When the used spec is nested, like a map or a struct, you can access to a specific leaf using ..
jack run -q "specs.system.os.kernel.version=~'6.17.*'" kernel-specific.taskYou can also access to an element of a list:
jack run -q "specs.system.network.interfaces[0].status==up" network.configure4. Target from a file
You can import a list of target from a file (one node per line).
node1
node2
node3jack run -f ./nodes.txt cmd.run "pwd"Execute plugins as standalone binaries
Plugins can be executed directly from the terminal without Jackadi, see Standalone executable.