Skip to main content

Update

Refresh the package source lists on the target host. This is equivalent to running apt-get update -- it does not upgrade any packages:

$ osapi client node package update --target web-01

Job ID: 550e8400-e29b-41d4-a716-446655440000

HOSTNAME STATUS CHANGED
web-01 changed true

1 host: 1 changed

Broadcast to refresh sources across all hosts:

$ osapi client node package update --target _all

Job ID: 550e8400-e29b-41d4-a716-446655440000

HOSTNAME STATUS CHANGED
web-01 changed true
web-02 changed true
mac-01 skip

3 hosts: 2 changed, 1 skipped

Details:
mac-01 unsupported platform

JSON Output

Use --json to get the full API response:

$ osapi client node package update --target web-01 --json
{"results":[{"hostname":"web-01","changed":true,"status":"ok"}],
"job_id":"..."}

Flags

FlagDescriptionDefault
-T, --targetTarget: _any, _all, hostname, or label (group:web)_all
-j, --jsonOutput raw JSON response